Bug 1842964
Summary: | volumesnapshot instance can not be deleted when the volumesnapshotcontent instance's deletionpolicy changed from Delete to Retain | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Qin Ping <piqin> |
Component: | Storage | Assignee: | Christian Huffman <chuffman> |
Storage sub component: | Kubernetes External Components | QA Contact: | Wei Duan <wduan> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | low | ||
Priority: | medium | CC: | aos-bugs, jsafrane |
Version: | 4.5 | ||
Target Milestone: | --- | ||
Target Release: | 4.6.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
Cause: Finalizers are added to VolumeSnapshot objects to prevent their deletion before any associated resources are removed. These finalizers were not updated if the associated VolumeSnapshotContent's deletion policy was updated.
Consequence: The VolumeSnapshot object could not be deleted, as the finalizers were never removed.
Fix: The logic for finalizers was reworked. These are now correctly removed if the VolumeSnapshotContent's deletion policy is modified.
Result: VolumeSnapshot instances can now be deleted successfully if the associated objects are removed.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2020-10-27 16:03:47 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: |
Description
Qin Ping
2020-06-02 13:04:43 UTC
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 |