From d8e698f6092e70e17ee14058c4fd0396d3b5b253 Mon Sep 17 00:00:00 2001 From: Sameer Shaikh Date: Thu, 29 Jun 2023 08:03:57 +0530 Subject: [PATCH] external-snapshotter constantly retrying CreateSnapshot calls on error w/o backoff --- pkg/sidecar-controller/snapshot_controller_base.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/sidecar-controller/snapshot_controller_base.go b/pkg/sidecar-controller/snapshot_controller_base.go index b9e6f8da..bd4e695b 100644 --- a/pkg/sidecar-controller/snapshot_controller_base.go +++ b/pkg/sidecar-controller/snapshot_controller_base.go @@ -120,6 +120,8 @@ func NewCSISnapshotSideCarController( // VolumeSnapshotContent. // This will trigger a VolumeSnapshotContent update and it will cause the obj to be re-queued immediately // and CSI CreateSnapshot will be called again without exponential backoff. + // Considering the object is modified more than once during the workflow we are not relying on the annoations of oldobj and newobj. + // We will just check if newobj status has error and avoid re-queue. // So we are skipping the re-queue here to avoid CreateSnapshot being called without exponential backoff. newSnapContent := newObj.(*crdv1.VolumeSnapshotContent) if newSnapContent.Status != nil && newSnapContent.Status.Error != nil {