Skip to content

Commit

Permalink
add check continue VGS deletion
Browse files Browse the repository at this point in the history
this commit adds check to continue deleting the
volumegroupsnapshot in case there are no snapshotcontent
found under that group.

Signed-off-by: yati1998 <ypadia@redhat.com>
  • Loading branch information
yati1998 committed Sep 26, 2024
1 parent 5ad0cfb commit 050c0a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/sidecar-controller/groupsnapshot_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ func (ctrl *csiSnapshotSideCarController) deleteCSIGroupSnapshotOperation(groupS
for _, contentRef := range groupSnapshotContent.Status.PVVolumeSnapshotContentList {
snapshotContent, err := ctrl.contentLister.Get(contentRef.VolumeSnapshotContentRef.Name)
if err != nil {
if errors.IsNotFound(err) {
klog.Infof("snapshot content %v not found", contentRef.VolumeSnapshotContentRef.Name)
continue
}
return fmt.Errorf("failed to get snapshot content %s from snapshot content store: %v", contentRef.VolumeSnapshotContentRef.Name, err)
}
snapshotIDs = append(snapshotIDs, *snapshotContent.Status.SnapshotHandle)
Expand Down

0 comments on commit 050c0a6

Please sign in to comment.