Skip to content

Commit

Permalink
Returning actual error while snapshot timing out
Browse files Browse the repository at this point in the history
Signed-off-by: Shashank Singh <[email protected]>
  • Loading branch information
Shashank Singh committed Oct 3, 2023
1 parent 8f418e9 commit 1b2d476
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ func GetVolumeSnapshotContentForVolumeSnapshot(volSnap *snapshotv1api.VolumeSnap
if err == wait.ErrWaitTimeout {
if snapshotContent.Status != nil && snapshotContent.Status.Error != nil {
log.Errorf("Timed out awaiting reconciliation of volumesnapshot, Volumesnapshotcontent %s has error: %v", snapshotContent.Name, *snapshotContent.Status.Error.Message)
return nil, errors.Errorf("CSI got timed out with error: %v", *snapshotContent.Status.Error.Message)
} else {
log.Errorf("Timed out awaiting reconciliation of volumesnapshot %s/%s", volSnap.Namespace, volSnap.Name)
}
Expand Down Expand Up @@ -401,7 +402,7 @@ func CleanupVolumeSnapshot(volSnap *snapshotv1api.VolumeSnapshot, snapshotClient
if err != nil {
log.Debugf("Failed to delete volumesnapshot %s/%s: %v", vs.Namespace, vs.Name, err)
} else {
log.Info("Deleted volumesnapshot with volumesnapshotContent %s/%s", vs.Namespace, vs.Name)
log.Infof("Deleted volumesnapshot with volumesnapshotContent %s/%s", vs.Namespace, vs.Name)
}
}

Expand Down

0 comments on commit 1b2d476

Please sign in to comment.