From 2f9505b78839c73a038e69cd7f91919e157c3905 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 3 Dec 2024 16:00:50 +0100 Subject: [PATCH] Dont call DeleteSnapshot when VS belong to VGS Dont call the DeleteSnapshot RPC call when a snapshot is created as part of the VolumeGroupSnapshot. --- pkg/sidecar-controller/snapshot_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sidecar-controller/snapshot_controller.go b/pkg/sidecar-controller/snapshot_controller.go index 0be89e0ad..f80a40442 100644 --- a/pkg/sidecar-controller/snapshot_controller.go +++ b/pkg/sidecar-controller/snapshot_controller.go @@ -61,7 +61,7 @@ func (ctrl *csiSnapshotSideCarController) syncContent(content *crdv1.VolumeSnaps if ctrl.shouldDelete(content) { klog.V(4).Infof("VolumeSnapshotContent[%s]: the policy is %s", content.Name, content.Spec.DeletionPolicy) if content.Spec.DeletionPolicy == crdv1.VolumeSnapshotContentDelete && - content.Status != nil && content.Status.SnapshotHandle != nil { + content.Status != nil && content.Status.SnapshotHandle != nil && content.Status.VolumeGroupSnapshotHandle == nil { // issue a CSI deletion call if the snapshot has not been deleted yet from // underlying storage system. Note that the deletion snapshot operation will // update content SnapshotHandle to nil upon a successful deletion. At this