Skip to content

Commit

Permalink
Enqueue dangling volumesnapshotcontents through resyncperiod
Browse files Browse the repository at this point in the history
According to some testing, it's possible under some conditions
to get stuck in a loop where the content never gets deleted.
This should at least alleviate that case with an eventual requeue
through resyncPeriod.

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
  • Loading branch information
akalenyu committed Dec 23, 2024
1 parent 3ae1f49 commit 3f57d89
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/utils/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,10 @@ func GetDynamicSnapshotContentNameForGroupSnapshot(groupSnapshot *crdv1beta1.Vol
// If the VolumeSnapshotContent object still contains other changes after this sanitization, the changes
// are potentially meaningful and the object is enqueued to be considered for syncing
func ShouldEnqueueContentChange(old *crdv1.VolumeSnapshotContent, new *crdv1.VolumeSnapshotContent) bool {
if new.ObjectMeta.DeletionTimestamp != nil {
// This allows a hanging content to get bailed out eventually through resync period
return true
}
sanitized := new.DeepCopy()
// ResourceVersion always changes between revisions
sanitized.ResourceVersion = old.ResourceVersion
Expand Down

0 comments on commit 3f57d89

Please # to comment.