Bug 1870331 - OCP 4.6 UI: UI should not allow to provide a different size for Clone PVC and Snapshot restore page
Summary: OCP 4.6 UI: UI should not allow to provide a different size for Clone PVC and...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Console Storage Plugin
Version: 4.6
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.6.0
Assignee: Kanika Murarka
QA Contact: Neha Berry
URL:
Whiteboard:
Depends On:
Blocks: 1881964
TreeView+ depends on / blocked
 
Reported: 2020-08-19 18:56 UTC by Neha Berry
Modified: 2020-10-27 16:30 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:29:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Event in UI (137.51 KB, image/png)
2020-08-19 19:28 UTC, Neha Berry
no flags Details
Screencast and screenshots of the flow (1.26 MB, application/zip)
2020-09-28 09:33 UTC, Neha Berry
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 6683 0 None closed Bug 1870331: Not allow to change size for OCS based resource 2020-11-09 06:47:26 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:30:01 UTC

Description Neha Berry 2020-08-19 18:56:10 UTC
Description of problem (please be detailed as possible and provide log
snippests):
----------------------------------------------------------------------
OCS 4.6 Clone creation stuck in pending state as it is not permitted in CSI to provide a size different than the source volume.

Hence, we should block the ability to modify or provide a size for Clone PVC in UI. UI should use the exact same size for CLone automatically.

Cureent Observation:
-----------------------
UI allows to provide the size for Clone PVC and then on clicking create, the PVC stays in pending state as CSI doesnt accept the new size


  Normal   Provisioning          6s (x6 over 21s)  openshift-storage.rbd.csi.ceph.com_csi-rbdplugin-provisioner-58ffd4559d-pqdb6_e2222a36-5810-4ccd-b322-6c6c336444e2  External provisioner is provisioning volume for claim "test-clone/test-pvc-clone"
  Warning  ProvisioningFailed    5s (x6 over 21s)  openshift-storage.rbd.csi.ceph.com_csi-rbdplugin-provisioner-58ffd4559d-pqdb6_e2222a36-5810-4ccd-b322-6c6c336444e2  failed to provision volume with StorageClass "ocs-storagecluster-ceph-rbd": rpc error: code = InvalidArgument desc = size missmatch, requested volume size 21474836480 and source volume size 10737418240
  Normal   ExternalProvisioning  3s (x4 over 21s)  persistentvolume-controller                                                                                         waiting for a volume to be created, either by external provisioner "openshift-storage.rbd.csi.ceph.com" or manually created by system administrator



Attached screenshot. 

P.S: Currently, there is no way in the CLI to block this as well, which can raise problems if someone tries cloning from CLI

Version of all relevant components (if applicable):
----------------------------------------------------------------------

$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.6.0-0.nightly-2020-08-18-165040   True        False         4h5m    Cluster version is 4.6.0-0.nightly-2020-08-18-165040

$ oc get csv -n openshift-storage
NAME                         DISPLAY                       VERSION        REPLACES   PHASE
ocs-operator.v4.6.0-533.ci   OpenShift Container Storage   4.6.0-533.ci              Succeeded




Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
----------------------------------------------------------------------
Yes the Clone PVC is in Pending state and endless retries are happening

Is there any workaround available to the best of your knowledge?
----------------------------------------------------------------------
Not sure

Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?
----------------------------------------------------------------------

2

Can this issue reproducible?
----------------------------------------------------------------------

Yes

Can this issue reproduce from the UI?
----------------------------------------------------------------------
Yes

If this is a regression, please provide more details to justify this:
----------------------------------------------------------------------
No

Steps to Reproduce:
----------------------------------------------------------------------
1. Create an OCS + OCP 4.6 cluster on AWS/Vmware
2. Create a PVC from UI : Storage->PersistentVolumeClaims-> Create Persistent Volume Claim
3. once it is Bound, Navigate to the PVC page
4. Click on 3 Dots-> Clone PVC
5. In the window, provide a size greater than the source PVC size. Click Clone
6. Check the PVC status and Events associated with it

Actual results:
----------------------------------------------------------------------
UI allows to provide a different size for the Clone PVC and the resulting Clone PVC is in Pending state

Expected results:
----------------------------------------------------------------------
UI should not allow to provide a different size. the Test box for size should be greyed out until CLI fixes it somehow.


Additional info:
----------------------------------------------------------------------


[$ oc get pvc
NAME             STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS                  AGE
test-pvc         Bound     pvc-222051c3-68ed-4650-8142-856f4f5af361   10Gi       RWO            ocs-storagecluster-ceph-rbd   3m51s
test-pvc-clone   Pending                                                                        ocs-storagecluster-ceph-rbd   7s


$ oc describe pvc test-pvc-clone
Name:          test-pvc-clone
Namespace:     test-clone
StorageClass:  ocs-storagecluster-ceph-rbd
Status:        Pending
Volume:        
Labels:        <none>
Annotations:   volume.beta.kubernetes.io/storage-provisioner: openshift-storage.rbd.csi.ceph.com
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      
Access Modes:  
VolumeMode:    Filesystem
DataSource:
  APIGroup:  
  Kind:      PersistentVolumeClaim
  Name:      test-pvc
Mounted By:  <none>
Events:
  Type     Reason                Age               From                                                                                                                Message
  ----     ------                ----              ----                                                                                                                -------
  Normal   Provisioning          6s (x6 over 21s)  openshift-storage.rbd.csi.ceph.com_csi-rbdplugin-provisioner-58ffd4559d-pqdb6_e2222a36-5810-4ccd-b322-6c6c336444e2  External provisioner is provisioning volume for claim "test-clone/test-pvc-clone"
  Warning  ProvisioningFailed    5s (x6 over 21s)  openshift-storage.rbd.csi.ceph.com_csi-rbdplugin-provisioner-58ffd4559d-pqdb6_e2222a36-5810-4ccd-b322-6c6c336444e2  failed to provision volume with StorageClass "ocs-storagecluster-ceph-rbd": rpc error: code = InvalidArgument desc = size missmatch, requested volume size 21474836480 and source volume size 10737418240
  Normal   ExternalProvisioning  3s (x4 over 21s)  persistentvolume-controller                                                                                         waiting for a volume to be created, either by external provisioner "openshift-storage.rbd.csi.ceph.com" or manually created by system administrator



From UI

PVC Details


NamespaceNS test-clone

StorageClass SCocs-storagecluster-ceph-rbd

Requested Capacity

10 GiB

Used Capacity

-
Access Mode Single User (RWO)

Volume Mode Filesystem

Comment 3 Neha Berry 2020-08-19 19:28:05 UTC
Created attachment 1711937 [details]
Event in UI

Comment 4 Humble Chirammal 2020-09-22 07:05:04 UTC
Ankush this prevention is ALSO applicable for "Restore from Snapshot" too? Isnt it ?

Comment 5 Ankush Behl 2020-09-23 19:36:55 UTC
@humble Yes the PR mentioned disables it for both clone & restore.

Comment 7 Neha Berry 2020-09-28 09:33:01 UTC
Created attachment 1717230 [details]
Screencast and screenshots of the flow

Verified the fix in the following versions

OCP = 4.6.0-0.nightly-2020-09-25-070943

OCS = 4.6.0-569.ci


Observation:

The size box is greyed out and user is unable to change the size of the PVC for the following 2 flows:

a) Clone PVC
b) restore as a new PVC (Volume Snapshot page) 

Attached a screen-cast and few screenshots for the verification in this comment.


P.S: The PVCs created were RWO. Did not test RBD + RWX + block mode.

Comment 10 errata-xmlrpc 2020-10-27 16:29:46 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 (OpenShift Container Platform 4.6 GA Images), 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/RHBA-2020:4196


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