mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-10 15:07:29 +00:00
Fixed backup deletion bug related to async operations
Signed-off-by: Scott Seago <sseago@redhat.com>
This commit is contained in:
@@ -267,7 +267,12 @@ func (b *backupReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctr
|
||||
}
|
||||
|
||||
b.backupTracker.Add(request.Namespace, request.Name)
|
||||
defer b.backupTracker.Delete(request.Namespace, request.Name)
|
||||
defer func() {
|
||||
switch request.Status.Phase {
|
||||
case velerov1api.BackupPhaseCompleted, velerov1api.BackupPhasePartiallyFailed, velerov1api.BackupPhaseFailed, velerov1api.BackupPhaseFailedValidation:
|
||||
b.backupTracker.Delete(request.Namespace, request.Name)
|
||||
}
|
||||
}()
|
||||
|
||||
log.Debug("Running backup")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user