Bug 1390480

Summary: '--recreate' option can't remove the old cluster role and project role
Product: OpenShift Container Platform Reporter: zhou ying <yinzhou>
Component: apiserver-authAssignee: Abhishek Gupta <abhgupta>
Status: CLOSED CURRENTRELEASE QA Contact: Chuan Yu <chuyu>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: abhgupta, aos-bugs, jgoulding
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-16 22:12:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1303130    

Description zhou ying 2016-11-01 08:12:11 UTC
Description of problem:
Download apply-dedicated-roles.py and json files from the repo. When use the script to assign dedicated admin role to user with '--recreate' option, the old cluster role and project role can't be deleted. 

Version-Release number of selected component (if applicable):
openshift version
openshift v3.4.0.18+ada983f
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0
apply-dedicated-roles.py 0.1

How reproducible:
always

Steps to Reproduce:
1. Create 3 projects: pro1, pro2,pro3;
2. Use the script to assign dedicated admin role to group with skip project: 'pro1';
   `python apply-dedicated-roles.py -c dedicated-cluster-admin.json -p dedicated-project-admin.json -d dedicated-admin-group.json -g gtest  -r  -s pro1 -v`
3. As the user , check the projects;
4. Use the script to reassign dedicated admin role to group with skip project: 'pro2' and '--recreate' option:
   `python apply-dedicated-roles.py -c dedicated-cluster-admin.json -p dedicated-project-admin.json -d dedicated-admin-group.json -g gtest  -r  -s pro2 -v`
5. As the user, check the projects;


Actual results:
3. Could see project: pro2,pro3;
5. Could see project: pro1,pro2,pro3.

Expected results:
5. Should only see project: pro1,pro3, and delete the old cluster role and project role of pro2.


Additional info:

Comment 1 Abhishek Gupta 2016-11-01 16:46:19 UTC
*** Bug 1385864 has been marked as a duplicate of this bug. ***