Description of problem: volumesnapshot instance can not be deleted when the volumesnapshotcontent instance's deletionpolicy changed from Delete Version-Release number of selected component (if applicable): $ oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.5.0-0.nightly-2020-05-30-025738 True False 30h Cluster version is 4.5.0-0.nightly-2020-05-30-025738 How reproducible: Always Steps to Reproduce: 1. Install aws ebs csi driver with operator 2. Create volumesnapshotclass with deletionPolicy=Delete $ cat volumesnapshotclass.yaml apiVersion: snapshot.storage.k8s.io/v1beta1 kind: VolumeSnapshotClass metadata: name: csi-aws-ebs-snapclass annotations: snapshot.storage.kubernetes.io/is-default-class: "true" driver: ebs.csi.aws.com deletionPolicy: Delete 3. Create a volumesnapshot instance with this volumesnapshotclass $ cat volumesnapshot.yaml apiVersion: snapshot.storage.k8s.io/v1beta1 kind: VolumeSnapshot metadata: name: mysnapp-2 spec: volumeSnapshotClassName: csi-aws-ebs-snapclass source: persistentVolumeClaimName: pvc2 4. After the volumesnapshotcontent instance becomes ReadyToUse, update the volumesnapshotcontent instance's deletionpolicy from "Delete" to "Retain". 5. Delete the volumesnapshot instance Actual results: volumesnapshot instance can not be deleted, after the volumesnapshotcontent instance's deletionpolicy reset to "Delete", the volumesnapshot instance is deleted successfully. Expected results: the volumesnapshot instance can be deleted. Master Log: Node Log (of failed PODs): PV Dump: PVC Dump: StorageClass Dump (if StorageClass used by PV/PVC): Additional info: When creating volumesnapshot instance with a volumesnapshotclass with "Retaion" deletion policy, the volumesnapshot instance can be deleted.
I submitted a PR [1] to address this upstream. This PR removes the bound Finalizer if the snapshotContent is modified to Retain. [1] https://github.com/kubernetes-csi/external-snapshotter/pull/327
I was mistaken previously - it looks like this issue persists up until v2.1.0 upstream. In v2.1.1 and later, this issue is addressed. We'll be able to close this one out once we rebase the external-snapshotter.
The PR to rebase [1] the CSI snapshot controller operator has been merged into master, which should resolve this issue. Setting to MODIFIED. [1] https://github.com/openshift/cluster-csi-snapshot-controller-operator/pull/43
Verified pass $ oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.6.0-0.nightly-2020-08-06-131904 True False 36m Cluster version is 4.6.0-0.nightly-2020-08-06-131904 1. Create volumesnapshot instance, volumesnapshotcontent is DELETIONPOLICY=Delete $ oc get volumesnapshot NAME READYTOUSE SOURCEPVC SOURCESNAPSHOTCONTENT RESTORESIZE SNAPSHOTCLASS SNAPSHOTCONTENT CREATIONTIME AGE mysnapshot-01 true mypvc01 3Gi csi-aws-ebs-snapclass snapcontent-5a1c8435-ef3a-42e6-9d1a-2f1808ce90fe 85s 85s $ oc get volumeSNAPSHOTCONTENT NAME READYTOUSE RESTORESIZE DELETIONPOLICY DRIVER VOLUMESNAPSHOTCLASS VOLUMESNAPSHOT AGE snapcontent-5a1c8435-ef3a-42e6-9d1a-2f1808ce90fe true 3221225472 Delete ebs.csi.aws.com csi-aws-ebs-snapclass mysnapshot-01 105s 2. Update the volumesnapshotcontent instance's deletionpolicy from "Delete" to "Retain" $ oc get volumeSNAPSHOTCONTENT NAME READYTOUSE RESTORESIZE DELETIONPOLICY DRIVER VOLUMESNAPSHOTCLASS VOLUMESNAPSHOT AGE snapcontent-5a1c8435-ef3a-42e6-9d1a-2f1808ce90fe true 3221225472 Retain ebs.csi.aws.com csi-aws-ebs-snapclass mysnapshot-01 2m56s 3. Delete volumesnapshot instance successfully, and volumesnapshotcontent is "Retain" $ oc delete volumesnapshot mysnapshot-01 volumesnapshot.snapshot.storage.k8s.io "mysnapshot-01" deleted $ oc get volumesnapshot mysnapshot-01 Error from server (NotFound): volumesnapshots.snapshot.storage.k8s.io "mysnapshot-01" not found $ oc get volumeSNAPSHOTCONTENT NAME READYTOUSE RESTORESIZE DELETIONPOLICY DRIVER VOLUMESNAPSHOTCLASS VOLUMESNAPSHOT AGE snapcontent-5a1c8435-ef3a-42e6-9d1a-2f1808ce90fe true 3221225472 Retain ebs.csi.aws.com csi-aws-ebs-snapclass mysnapshot-01 3m29s
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