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

Commit 2ec53bb

Browse files
Merge pull request #215 from sbahar619/fix-panic-when-csi-timeout-duration-is-short
Fix panic when csi timeout duration is short
2 parents 3b1bf9a + 70f386c commit 2ec53bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/util/util.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ func GetVolumeSnapshotContentForVolumeSnapshot(volSnap *snapshotv1api.VolumeSnap
268268

269269
if err != nil {
270270
if err == wait.ErrWaitTimeout {
271-
if snapshotContent.Status != nil && snapshotContent.Status.Error != nil {
271+
if snapshotContent != nil && snapshotContent.Status != nil && snapshotContent.Status.Error != nil {
272272
log.Errorf("Timed out awaiting reconciliation of volumesnapshot, Volumesnapshotcontent %s has error: %v", snapshotContent.Name, *snapshotContent.Status.Error.Message)
273273
return nil, errors.Errorf("CSI got timed out with error: %v", *snapshotContent.Status.Error.Message)
274274
} else {

0 commit comments

Comments
 (0)