You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a dynamic VolumeSnapshot refer to a VolumeSnapshotClass with DeletionPolicy as Delete, this should trigger a VolumeSnapshotContent creation for the given PVC, and both VolumeSnapshot and VolumeSnapshotContent should have the following finalizer:
snapshot.storage.kubernetes.io/volumesnapshot-bound-protection
Update VolumeSnapshotContent's DeletionPolicy from Delete to Retain, i.e., kubectl edit and apply.
kubectl delete . This should effectively remove the VolumeSnapshot from API server with VolumeSnapshotContent untouched. However the VolumeSnapshot will not be deleted from API server due to the finalizer.
/cc @xing-yang
When delete a bi-directionally bound VolumeSnapshot and VolumeSnapshotContent with DeletionPolicy set to "Delete" on the content, the original idea is to wait until the VolumeSnapshotContent is removed from API server before removing the bound finalizer on VolumeSnapshot. However that does not apply to the situation when deletion policy is "Retain".
yuxiangqian
changed the title
Not able delete a VolumeSnapshot if it's corresponding VolumeSnapshotContent updates deletion policy from Delete to Retain
Not able to delete a VolumeSnapshot if it's corresponding VolumeSnapshotContent updates deletion policy from Delete to Retain
Apr 10, 2020
Steps to reproduce the issue:
snapshot.storage.kubernetes.io/volumesnapshot-bound-protection
Root cause is here:
https://github.com/kubernetes-csi/external-snapshotter/blob/master/pkg/common-controller/snapshot_controller.go#L298
The bound finalizer should have been removed from both VolumeSnapshot and VolumeSnapshotContent even if a content exists.
The text was updated successfully, but these errors were encountered: