Bug 1903078

Summary: Deleting VolumeSnapshotClass makes VolumeSnapshot not Ready
Product: OpenShift Container Platform Reporter: Mudit Agarwal <muagarwa>
Component: StorageAssignee: Christian Huffman <chuffman>
Storage sub component: Storage QA Contact: Wei Duan <wduan>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: aos-bugs, ebenahar, hchiramm, jijoy, jsafrane, madam, mrajanna, muagarwa, ocs-bugs, wduan
Version: 4.6   
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1902711 Environment:
Last Closed: 2021-02-24 15:36:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1902711    
Bug Blocks:    

Comment 2 Christian Huffman 2021-01-04 15:32:04 UTC
The external snapshotter was rebased to 4.0, which includes this fix, in https://github.com/openshift/csi-external-snapshotter/pull/36 .

Comment 5 Wei Duan 2021-01-07 12:15:20 UTC
1.Reproduced in OCP4.6.9, after deleting the volumesnapshotclass, volumesnapshot become not "READYTOUSE", and could not restore pvc from volumesnapshot.

2. Verified pass on OCP4.7 nightly, volumesnapshot still in "READYTOUSE" after deleting the volumesnapshotclass, and restore pvc successfully from volumesnapshot.

$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.7.0-0.nightly-2021-01-06-094712   True        False         22h     Cluster version is 4.7.0-0.nightly-2021-01-06-094712

$ oc get volumesnapshot
NAME         READYTOUSE   SOURCEPVC   SOURCESNAPSHOTCONTENT   RESTORESIZE   SNAPSHOTCLASS          SNAPSHOTCONTENT                                    CREATIONTIME   AGE
mysnapshot   true         mypvc-ori                           3Gi           csi-cinder-snapclass   snapcontent-93055ac9-3b54-4302-8b4f-e2019da01124   9s             9s

$ oc get volumesnapshotcontent
NAME                                               READYTOUSE   RESTORESIZE   DELETIONPOLICY   DRIVER                     VOLUMESNAPSHOTCLASS    VOLUMESNAPSHOT   AGE
snapcontent-93055ac9-3b54-4302-8b4f-e2019da01124   true         3221225472    Delete           cinder.csi.openstack.org   csi-cinder-snapclass   mysnapshot       19s

$ oc delete volumesnapshotclass.snapshot.storage.k8s.io/csi-cinder-snapclass
volumesnapshotclass.snapshot.storage.k8s.io "csi-cinder-snapclass" deleted

$ oc get volumesnapshotclass
No resources found

$ oc get volumesnapshot
NAME         READYTOUSE   SOURCEPVC   SOURCESNAPSHOTCONTENT   RESTORESIZE   SNAPSHOTCLASS          SNAPSHOTCONTENT                                    CREATIONTIME   AGE
mysnapshot   true         mypvc-ori                           3Gi           csi-cinder-snapclass   snapcontent-93055ac9-3b54-4302-8b4f-e2019da01124   10m            10m

$ oc get volumesnapshotcontent
NAME                                               READYTOUSE   RESTORESIZE   DELETIONPOLICY   DRIVER                     VOLUMESNAPSHOTCLASS    VOLUMESNAPSHOT   AGE
snapcontent-93055ac9-3b54-4302-8b4f-e2019da01124   true         3221225472    Delete           cinder.csi.openstack.org   csi-cinder-snapclass   mysnapshot       10m

Comment 7 Humble Chirammal 2021-02-19 05:47:56 UTC
>after deleting the volumesnapshotclass, volumesnapshot become not "READYTOUSE", and could not restore pvc from volumesnapshot..

Wei, you meant volumesnapshot become `true` which is the desired result, Isnt it ?

Comment 8 Wei Duan 2021-02-20 13:26:08 UTC
@Humble, as I used cinder csi driver but not OCS to verify this bug(I think that is a common issue), so the first step is to reproduce the issue on OCP4.6.9, after deleting the volumesnapshotclass, the value of 'readyToUse' parameter became false, I think I reproduced it, so I had the following word, let me know if anything makes you misunderstand:)

1.Reproduced in OCP4.6.9, after deleting the volumesnapshotclass, volumesnapshot become not "READYTOUSE", and could not restore pvc from volumesnapshot.

Comment 10 errata-xmlrpc 2021-02-24 15:36:34 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.7.0 security, bug fix, and enhancement 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-2020:5633