Deal with PartiallyFailed orphaned backups as well as Completed ones

Fixes https://github.com/vmware-tanzu/velero/issues/6648

Signed-off-by: Scott Seago <sseago@redhat.com>
This commit is contained in:
Scott Seago
2023-08-14 13:40:32 -04:00
parent 713792d63e
commit 441a32a861
3 changed files with 19 additions and 9 deletions
+1 -1
View File
@@ -331,7 +331,7 @@ func (b *backupSyncReconciler) deleteOrphanedBackups(ctx context.Context, locati
for i, backup := range backupList.Items {
log = log.WithField("backup", backup.Name)
if backup.Status.Phase != velerov1api.BackupPhaseCompleted || backupStoreBackups.Has(backup.Name) {
if !(backup.Status.Phase == velerov1api.BackupPhaseCompleted || backup.Status.Phase == velerov1api.BackupPhasePartiallyFailed) || backupStoreBackups.Has(backup.Name) {
continue
}