Bug 1949019 - PersistentVolumes page cannot sync project status automatically which will block user to create PV
Summary: PersistentVolumes page cannot sync project status automatically which will bl...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.8
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.8.0
Assignee: Cyril
QA Contact: Xiyun Zhao
URL:
Whiteboard: Scrubbed
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-13 09:14 UTC by Xiyun Zhao
Modified: 2024-10-01 17:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Incorrect code Consequence: Normal users are blocked from creating PV. Fix: Enabled PV create button by default for normal users. Result: The create PV button is enabled by default and it doesn't depend on project status.
Clone Of:
Environment:
Last Closed: 2021-07-27 22:59:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Create PersistentVolumes (47.96 KB, image/png)
2021-04-13 09:14 UTC, Xiyun Zhao
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 8726 0 None open Bug 1949019: - PersistentVolumes page cannot sync project status automatically which will block user to create PV 2021-04-21 14:08:04 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:00:13 UTC

Description Xiyun Zhao 2021-04-13 09:14:37 UTC
Created attachment 1771569 [details]
Create PersistentVolumes

Created attachment 1771569 [details]
Create PersistentVolumes

Description of problem:
PersistentVolumes page cannot sync project status automatically which will block user to create PV 

Version-Release number of selected component (if applicable):
4.8.0-0.nightly-2021-04-09-222447

How reproducible:
Every time

Steps to Reproduce:
1. Login to OCP CLI as administrator.
2. Create a Group by using below command and file
   oc create -f testgroup
   
   $cat testgroup
    apiVersion: user.openshift.io/v1
    kind: Group
    metadata:
      name: testgroup
    users:
      - testuser-0
3. Add RoleBindings for the group by following below command:   
   oc adm policy add-cluster-role-to-group system:persistent-volume-provisioner testgroup --rolebinding-name system:persistent-volume-provisioner-for-sre
4. Re-login the OCP as the normal user testuser-0
5. Navigate to page of PersistentVolumes, verify if 'create PersistentVolumes' button is enabled and a notice of suggest user to create a new project can be found on the top of the page (Attached snapshot)
6. Follow the suggestion and click on the link of 'create a new project'
7. Navigate to the page of PersistentVolumes again, verify if the 'Create PersistenVolum' button is enabled, and user is able to create PV without more action.


Actual results:
7. The button of "Create PersistentVolume" is disabled.  

Expected results:
The button of "Create PersistentVolume" can be enabled automatically when user jump to PersistentVolumes page from project page.

Additional info:

Comment 1 Cyril 2021-04-14 00:47:54 UTC
@xiyuzhao I'm unable to reproduce this bug. I followed the steps in BZ but got stuck in 4. Re-login the OCP as the normal user testuser-0. In OCP I need username and password to login. I created a normal user account using console UI with username and password but didn't see PersistentVolumes  in the Storage sub menu.

Comment 2 Xiyun Zhao 2021-04-14 01:23:56 UTC
@cajieh I think the issue is caused by the command of rolebinding, i have update the command for more clear, please try again.

Comment 3 Cyril 2021-04-14 13:06:12 UTC
@xiyuzhao Reproduced.

Comment 6 Xiyun Zhao 2021-06-15 02:08:57 UTC
This bug has been fixed and verified on payload 4.8.0-0.nightly-2021-06-14-145150

Verification step:
1. Login to OCP CLI as administrator.
2. Create a Group by using below command and file
   oc create -f testgroup
   
   $cat testgroup
    apiVersion: user.openshift.io/v1
    kind: Group
    metadata:
      name: testgroup
    users:
      - testuser-0
3. Add RoleBindings for the group by following below command:   
   oc adm policy add-cluster-role-to-group system:persistent-volume-provisioner testgroup --rolebinding-name system:persistent-volume-provisioner-for-sre
4. Re-login the OCP as the normal user testuser-0
5. Navigate to page of PersistentVolumes, verify if 'create PersistentVolumes' button is enabled and a notice of suggest user to create a new project can be found on the top of the page 
6. Follow the suggestion and click on the link of 'create a new project'
7. Navigate to the page of PersistentVolumes again, verify if the 'Create PersistenVolum' button is enabled, and user is able to create PV without more action.

Result:
5,6. The button of "Create PersistentVolume" is enabled by default for PV. User is able to create PV successfully. 

Additional info:     
The created PV can only shown after user create a project by follow the logic.

Comment 9 errata-xmlrpc 2021-07-27 22:59:58 UTC
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


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