Hide Forgot
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:
Fixed in https://github.com/openshift/online/pull/14
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
According to #Comment 2,verified this bug.