Bug 1310134 - [online_private_560]Could not assign the dedicated-project-admin role to the user automatically
Summary: [online_private_560]Could not assign the dedicated-project-admin role to the ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: apiserver-auth
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Ravi Sankar
QA Contact: weiwei jiang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-19 14:46 UTC by Wei Sun
Modified: 2019-03-29 15:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-23 15:09:32 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.