Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit 1b2d476

Browse files
author
Shashank Singh
committed
Returning actual error while snapshot timing out
Signed-off-by: Shashank Singh <[email protected]>
1 parent 8f418e9 commit 1b2d476

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/util/util.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ func GetVolumeSnapshotContentForVolumeSnapshot(volSnap *snapshotv1api.VolumeSnap
268268
if err == wait.ErrWaitTimeout {
269269
if snapshotContent.Status != nil && snapshotContent.Status.Error != nil {
270270
log.Errorf("Timed out awaiting reconciliation of volumesnapshot, Volumesnapshotcontent %s has error: %v", snapshotContent.Name, *snapshotContent.Status.Error.Message)
271+
return nil, errors.Errorf("CSI got timed out with error: %v", *snapshotContent.Status.Error.Message)
271272
} else {
272273
log.Errorf("Timed out awaiting reconciliation of volumesnapshot %s/%s", volSnap.Namespace, volSnap.Name)
273274
}
@@ -401,7 +402,7 @@ func CleanupVolumeSnapshot(volSnap *snapshotv1api.VolumeSnapshot, snapshotClient
401402
if err != nil {
402403
log.Debugf("Failed to delete volumesnapshot %s/%s: %v", vs.Namespace, vs.Name, err)
403404
} else {
404-
log.Info("Deleted volumesnapshot with volumesnapshotContent %s/%s", vs.Namespace, vs.Name)
405+
log.Infof("Deleted volumesnapshot with volumesnapshotContent %s/%s", vs.Namespace, vs.Name)
405406
}
406407
}
407408

0 commit comments

Comments
 (0)