Bug 1883587

Summary: No option for user to select volumeMode
Product: OpenShift Container Platform Reporter: Kanika Murarka <kmurarka>
Component: Console Storage PluginAssignee: gowtham <gshanmug>
Status: CLOSED ERRATA QA Contact: Jilju Joy <jijoy>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.6CC: aos-bugs, jijoy, nberry, nthomas, ocs-bugs, vbadrina
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 22:33:30 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:
Embargoed:
Attachments:
Description Flags
Screenshot showing RWX access mode is disabled while restoring RBD PVC with volume mode Block
none
Screenshot showing Block volume mode selection when CephFS storage class is selected none

Description Kanika Murarka 2020-09-29 16:00:33 UTC
Description of problem:
User not allowed to choose volume modes while creating PVC, cloning a claim or while restoring a snapshot.
Its supported for some provisioners:-
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#raw-block-volume-support

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Go to PVC page 
2. Click on create button
3. no option to choose an volume mode

Actual results:
No access mode selection

Expected results:
Should have a way to select access mode.

Comment 1 Kanika Murarka 2020-10-14 10:09:53 UTC
Note: Cloning of PVC should be done in same volume mode

Comment 2 Nishanth Thomas 2021-02-13 06:22:46 UTC
4.8 branched out, Moving this out of 4.7.0

Comment 4 Jilju Joy 2021-03-17 09:44:39 UTC
Created attachment 1763958 [details]
Screenshot showing RWX access mode is disabled while restoring RBD PVC with volume mode Block

Comment 5 Jilju Joy 2021-03-17 09:46:44 UTC
Created attachment 1763959 [details]
Screenshot showing Block volume mode selection when CephFS storage class is selected

Comment 6 Jilju Joy 2021-03-17 09:55:09 UTC
Tested in version:
OCP 4.8.0-0.nightly-2021-03-16-011405
OCS 4.8.0-302.ci 

Tested these scenarios:

RBD-RWO-FILESYSTEM  PVC snapshot restore to 1)RBD-RWO-FILESYSTEM  passed
                                            2)RBD-RWO-BLOCK       passed
                                            3)RBD-RWX-BLOCK  failed . Cannot select RWX access mode.

RBD-RWO-BLOCK PVC snapshot restore to 1) RBD-RWO-FILESYSTEM    passed
                                      2) RBD-RWO-BLOCK    passed
                                      3) RBD-RWX-BLOCK    failed. Cannot select RWX access mode.

RBD-RWX-BLOCK PVC snapshot restore to 1)RBD-RWO-FILESYSTEM    passed 
                                      2)RBD-RWO-BLOCK    passed 
                                      3)RBD-RWX-BLOCK failed. Cannot select RWX access mode.


Also Block volume mode selection is not disabled while restoring CephFS PVC snapshots.
Screenshots attached.

Comment 7 Vineet 2021-04-05 06:07:12 UTC
Complete fix coming as part of https://github.com/openshift/console/pull/8380
Assigning to the correct owner

Comment 8 gowtham 2021-04-06 06:11:57 UTC
I did a generic fix to solve all volumeMode and accessMode UI issues in all PVC related pages, fix is part of: https://bugzilla.redhat.com/show_bug.cgi?id=1936788

Comment 9 gowtham 2021-06-09 14:08:19 UTC
Fix for BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1936788 is fixed this issue also, moving this BZ manually to ON_QA

Comment 10 Jilju Joy 2021-06-15 07:56:40 UTC
Verified these scenarios:

RBD-RWO-FILESYSTEM  PVC snapshot restore to 1) RBD-RWO-FILESYSTEM  passed
                                            2) RBD-RWO-BLOCK       passed
                                            3) RBD-RWX-BLOCK       passed (After selecting RWX Access mode, Volume mode became Block without any selection option)
                                            4) RBD-ROX-FILESYSTEM  passed
                                            5) RBD-ROX-BLOCK       passed
                                            
RBD-RWO-BLOCK PVC snapshot restore to 1) RBD-RWO-FILESYSTEM    passed
                                      2) RBD-RWO-BLOCK         passed
                                      3) RBD-RWX-BLOCK         passed (After selecting RWX Access mode, Volume mode became Block without any selection option)
                                      4) RBD-ROX-FILESYSTEM    passed
                                      5) RBD-ROX-BLOCK         passed

RBD-RWX-BLOCK PVC snapshot restore to 1) RBD-RWO-FILESYSTEM   passed 
                                      2) RBD-RWO-BLOCK        passed 
                                      3) RBD-RWX-BLOCK        passed (Default to RWX Access mode. Volume mode is Block without any selection option)
                                      4) RBD-ROX-FILESYSTEM   passed
                                      5) RBD-ROX-BLOCK        passed

Default Access mode and Volume mode selection in the restore page for all of the above scenarios will be that of the parent PVC. So no need to change Volume mode or Access mode in the restore page if the user want the restored PVC to have Access mode and Volume mode same as the parent PVC. This behaviour is also seen in the absence of the parent PVC.
Tested all the above scenarios when the parent PVC is availabe and after deleting the parent PVC.
 
Volume mode selection is disabled while restoring CephFS PVC snapshot. By default Filesystem Volume mode will be enabled without an option to select Block volume mode. This works as expected.


Verified in version:
OCP 4.8.0-0.nightly-2021-06-13-101614
ocs-operator.v4.8.0-416.ci

Comment 13 errata-xmlrpc 2021-07-27 22:33:30 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