Skip to content

Commit c554274

Browse files
committed
Correct snapshotContent error propagation
1 parent 31a6091 commit c554274

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/sidecar-controller/snapshot_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ func (ctrl *csiSnapshotSideCarController) createSnapshotWrapper(content *crdv1.V
300300
// storage system has responded with an error
301301
klog.Infof("createSnapshotWrapper: CreateSnapshot for content %s returned error: %v", content.Name, err)
302302
if isCSIFinalError(err) {
303-
if err := ctrl.removeAnnVolumeSnapshotBeingCreated(content); err != nil {
304-
return nil, fmt.Errorf("failed to remove VolumeSnapshotBeingCreated annotation from the content %s: %s", content.Name, err)
303+
if removeAnnotationErr := ctrl.removeAnnVolumeSnapshotBeingCreated(content); removeAnnotationErr != nil {
304+
return nil, fmt.Errorf("failed to remove VolumeSnapshotBeingCreated annotation from the content %s: %s", content.Name, removeAnnotationErr)
305305
}
306306
}
307307

0 commit comments

Comments
 (0)