external-snapshotter constantly retrying CreateSnapshot calls on error w/o backoff

This commit is contained in:
Sameer Shaikh
2023-06-29 08:03:57 +05:30
parent ffaba0f81d
commit d8e698f609

View File

@@ -120,6 +120,8 @@ func NewCSISnapshotSideCarController(
// VolumeSnapshotContent. // VolumeSnapshotContent.
// This will trigger a VolumeSnapshotContent update and it will cause the obj to be re-queued immediately // 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. // 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. // So we are skipping the re-queue here to avoid CreateSnapshot being called without exponential backoff.
newSnapContent := newObj.(*crdv1.VolumeSnapshotContent) newSnapContent := newObj.(*crdv1.VolumeSnapshotContent)
if newSnapContent.Status != nil && newSnapContent.Status.Error != nil { if newSnapContent.Status != nil && newSnapContent.Status.Error != nil {