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
Created attachment 1711937 [details] Event in UI
Ankush this prevention is ALSO applicable for "Restore from Snapshot" too? Isnt it ?
@humble Yes the PR mentioned disables it for both clone & restore.
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.
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