Skip to content

Commit

Permalink
Dont call DeleteSnapshot when VS belong to VGS
Browse files Browse the repository at this point in the history
Dont call the DeleteSnapshot RPC call when a snapshot
is created as part of the VolumeGroupSnapshot.
  • Loading branch information
Madhu-1 committed Dec 3, 2024
1 parent 3cc3131 commit 2f9505b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sidecar-controller/snapshot_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2f9505b

Please sign in to comment.