@@ -344,6 +344,7 @@ func (ctrl *csiSnapshotCommonController) syncUnreadySnapshot(snapshot *crdv1.Vol
344
344
break
345
345
}
346
346
klog .V (4 ).Infof ("failed to update snapshot %s status: %v" , utils .SnapshotKey (snapshot ), err )
347
+ time .Sleep (ctrl .createSnapshotContentInterval )
347
348
}
348
349
349
350
if err != nil {
@@ -406,6 +407,7 @@ func (ctrl *csiSnapshotCommonController) syncUnreadySnapshot(snapshot *crdv1.Vol
406
407
break
407
408
}
408
409
klog .V (4 ).Infof ("failed to update snapshot %s status: %v" , utils .SnapshotKey (snapshot ), err )
410
+ time .Sleep (ctrl .createSnapshotContentInterval )
409
411
}
410
412
411
413
if err != nil {
@@ -865,16 +867,17 @@ func (ctrl *csiSnapshotCommonController) bindandUpdateVolumeSnapshot(snapshotCon
865
867
866
868
// Copy the snapshot object before updating it
867
869
snapshotCopy := snapshotObj .DeepCopy ()
868
-
869
870
// update snapshot status
871
+ var updateSnapshot * crdv1.VolumeSnapshot
870
872
for i := 0 ; i < ctrl .createSnapshotContentRetryCount ; i ++ {
871
873
klog .V (5 ).Infof ("bindandUpdateVolumeSnapshot [%s]: trying to update snapshot status" , utils .SnapshotKey (snapshotCopy ))
872
- updateSnapshot , err : = ctrl .updateSnapshotStatus (snapshotCopy , snapshotContent )
874
+ updateSnapshot , err = ctrl .updateSnapshotStatus (snapshotCopy , snapshotContent )
873
875
if err == nil {
874
876
snapshotCopy = updateSnapshot
875
877
break
876
878
}
877
879
klog .V (4 ).Infof ("failed to update snapshot %s status: %v" , utils .SnapshotKey (snapshot ), err )
880
+ time .Sleep (ctrl .createSnapshotContentInterval )
878
881
}
879
882
880
883
if err != nil {
0 commit comments