Skip to content

Commit 7fac9cd

Browse files
committed
external-snapshotter constantly retrying CreateSnapshot calls on error w/o backoff
1 parent d8e698f commit 7fac9cd

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

pkg/sidecar-controller/snapshot_controller_base.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,9 @@ func NewCSISnapshotSideCarController(
115115
cache.ResourceEventHandlerFuncs{
116116
AddFunc: func(obj interface{}) { ctrl.enqueueContentWork(obj) },
117117
UpdateFunc: func(oldObj, newObj interface{}) {
118-
// If the CSI driver fails to create a snapshot and returns a failure (indicated by content.Status.Error), the
119-
// CSI Snapshotter sidecar will remove the "AnnVolumeSnapshotBeingCreated" annotation from the
120-
// VolumeSnapshotContent.
121-
// This will trigger a VolumeSnapshotContent update and it will cause the obj to be re-queued immediately
122-
// and CSI CreateSnapshot will be called again without exponential backoff.
123-
// Considering the object is modified more than once during the workflow we are not relying on the annoations of oldobj and newobj.
124-
// We will just check if newobj status has error and avoid re-queue.
125-
// So we are skipping the re-queue here to avoid CreateSnapshot being called without exponential backoff.
118+
// Considering the object is modified more than once during the workflow we are not relying on the
119+
// "AnnVolumeSnapshotBeingCreated" annotation. Instead we will just check if newobj status has error
120+
// and avoid the immediate re-queue. This allows the retry to happen with exponential backoff.
126121
newSnapContent := newObj.(*crdv1.VolumeSnapshotContent)
127122
if newSnapContent.Status != nil && newSnapContent.Status.Error != nil {
128123
return

0 commit comments

Comments
 (0)