Hide Forgot
Description of problem: Under "RoleBindings" tab of one role page, click "Create binding", no role name could be set and after click "Create", the referred role name in the new rolebinding is the chosen role name with "undefined" suffix, which is not a real existing role. Version-Release number of selected component (if applicable): 4.8.0-0.nightly-2021-04-13-171608 How reproducible: Always Steps to Reproduce: 1.Go to "User Management"->"Roles" page, click into role "cluster-admin". 2.Under "RoleBindings" tab, create rolebinding by click "Create binding". 3.Check the new rolebinding yaml. Actual results: 2. In the "Role name" part, no role name is set or could be chosen. 3.The referred role "cluster-adminundefined" doesn't exist: roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: cluster-adminundefined Expected results: 2.Should set default role name for "Role name" field if user needn't set it manually. 3.The role name should be "cluster-admin" by default. Additional info:
This is a regression from https://github.com/openshift/console/pull/6035 and is present in 4.6 and 4.7.
Checked on ocp 4.8 cluster with payload 4.8.0-0.nightly-2021-04-18-101412. Steps to verify: 1.Go to "User Management"->"Roles" page, click into role "cluster-admin". 2.Under "RoleBindings" tab, create rolebinding by click "Create binding". Now the "Role name" is set to "cluster-admin" by default. 3.Check the new rolebinding yaml. The "roleRef:name" is "cluster-admin", and the user is granted "cluster-admin" role correctly. The bug is fixed.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:2438