Bug 1310134

Summary: [online_private_560]Could not assign the dedicated-project-admin role to the user automatically
Product: OpenShift Container Platform Reporter: Wei Sun <wsun>
Component: apiserver-authAssignee: Ravi Sankar <rpenta>
Status: CLOSED CURRENTRELEASE QA Contact: weiwei jiang <wjiang>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: aos-bugs, wsun
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-23 15:09:32 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:

Description Wei Sun 2016-02-19 14:46:29 UTC
Description of problem:
The two users created some projects,and ran the apply-dedicated-roles.py to apply the dedicated admin role to the user,but could not assign the dedicated-project-admin role successfully.
I got the messages:
Watching projects ...
Warning: skipping default           Active    10m

Warning: skipping openshift         Active    10m

Warning: skipping openshift-infra   Active    10m

Warning: skipping wjiang-1          Active    1m

Warning: skipping wjiang-2          Active    1m

Warning: skipping wsun-1            Active    1m

Warning: skipping wsun-2            Active    1m


Version-Release number of selected component (if applicable):
devenv-rhel7_3477
apply-dedicated-roles.py 0.1

How reproducible:
Always

Steps to Reproduce:
1.Download apply-dedicated-roles.py ,dedicated-cluster-admin.json , dedicated-project-admin.json 
2.Create some projects using one user,and create some projects using other user
3.Run apply-dedicated-roles.py to apply the dedicate admin role to one user
# python apply-dedicated-roles.py -c dedicated-cluster-admin.json -p dedicated-project-admin.json -u wsun -v 
4.Get the projects using the user

Actual results:
3.# python apply-dedicated-roles.py -c dedicated-cluster-admin.json -p dedicated-project-admin.json -u wsun -v
Arguments to program:
	ProjectRole = dedicated-project-admin
	ClusterRole = dedicated-cluster-admin
	Users = ['wsun']
	Groups = []
	SkipProjects = ['default', 'openshift-infra']
	ReCreate = False
	Verbose = True

Checking OpenShift CLI command ...
OK
Checking OpenShift admin CLI command ...
OK
Getting cluster role dedicated-cluster-admin if exists ...
OK
Creating cluster role dedicated-cluster-admin ...
OK
Adding cluster role dedicated-cluster-admin to users wsun ...
OK
Getting project role dedicated-project-admin if exists ...
OK
Creating project role dedicated-project-admin ...
OK
Getting policy bindings for all projects ...
OK
Watching projects ...
Warning: skipping default           Active    10m

Warning: skipping openshift         Active    10m

Warning: skipping openshift-infra   Active    10m

Warning: skipping wjiang-1          Active    1m

Warning: skipping wjiang-2          Active    1m

Warning: skipping wsun-1            Active    1m

Warning: skipping wsun-2            Active    1m

4.The user only could get his projects,could not list all dedicated users' projects

Expected results:
Should list all dedicated users' projects after running the script.

Additional info:

Comment 1 Ravi Sankar 2016-02-20 01:50:40 UTC
Fixed in https://github.com/openshift/online/pull/14

Comment 2 Wei Sun 2016-02-24 06:56:19 UTC
Checked this bug using the fixed apply-dedicated-roles.py ,the bug has been fixed.
After the bug is moved to ON_QA,I'll verify it.

Result:
]# python apply-dedicated-roles.py -c dedicated-cluster-admin.json -p dedicated-project-admin.json -u wsun -v
Arguments to program:
	ProjectRole = dedicated-project-admin
	ClusterRole = dedicated-cluster-admin
	Users = ['wsun']
	Groups = []
	SkipProjects = ['default', 'openshift-infra']
	ReCreate = False
	Verbose = True

Checking OpenShift CLI command ... 
OK
Checking OpenShift admin CLI command ... 
OK
Getting cluster role dedicated-cluster-admin if exists ... 
OK
Creating cluster role dedicated-cluster-admin ... 
OK
Adding cluster role dedicated-cluster-admin to users wsun ... 
OK
Getting project role dedicated-project-admin if exists ... 
OK
Creating project role dedicated-project-admin ... 
OK
Getting policy bindings for all projects ... 
OK
Watching projects ... 
Adding role dedicated-project-admin to users wsun in project chunchen ... 
OK
Adding role dedicated-project-admin to users wsun in project management-infra ... 
OK
Adding role dedicated-project-admin to users wsun in project openshift ... 
OK
Adding role dedicated-project-admin to users wsun in project prozyp ... 
OK
Adding role dedicated-project-admin to users wsun in project wsun-test1 ... 
OK
Adding role dedicated-project-admin to users wsun in project xxia-proj ... 
OK
Adding role dedicated-project-admin to users wsun in project xxia-proj-2 ... 
OK
Adding role dedicated-project-admin to users wsun in project yapei-test ... 
OK
Adding role dedicated-project-admin to users wsun in project zhouy ... 
OK

Comment 3 Wei Sun 2016-02-25 00:27:28 UTC
According to #Comment 2,verified this bug.