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

Signed-off-by: Sameer Shaikh <sameer.shaikh@ibm.com>
This commit is contained in:
Sameer Shaikh
2023-06-28 12:55:20 +05:30
parent dd523a00ef
commit 98939c02c5

View File

@@ -124,12 +124,7 @@ func NewCSISnapshotSideCarController(
// 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 {
oldSnapContent := oldObj.(*crdv1.VolumeSnapshotContent)
_, newExists := newSnapContent.ObjectMeta.Annotations[utils.AnnVolumeSnapshotBeingCreated]
_, oldExists := oldSnapContent.ObjectMeta.Annotations[utils.AnnVolumeSnapshotBeingCreated]
if !newExists && oldExists {
return
}
}
ctrl.enqueueContentWork(newObj)
},