Skip to content

Commit af80f0a

Browse files
wangyeleiapecloud-bot
authored andcommitted
fix: backup maybe failed when the selectedPodPolicy is all (#9556)
(cherry picked from commit 8fc7ddd)
1 parent 15063ee commit af80f0a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

controllers/dataprotection/backup_controller.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,8 +608,9 @@ func (r *BackupReconciler) handleRunningPhase(
608608
// check all actions status, if any action failed, update backup status to failed
609609
// if all actions completed, update backup status to completed, otherwise,
610610
// continue to handle following actions.
611-
actions:
612611
for targetPodName, acts := range actions {
612+
// the backup actions for selected pod
613+
targetPodBackupActions:
613614
for _, act := range acts {
614615
status, err := act.Execute(actionCtx)
615616
if err != nil {
@@ -623,10 +624,10 @@ func (r *BackupReconciler) handleRunningPhase(
623624
continue
624625
case dpv1alpha1.ActionPhaseFailed:
625626
existFailedAction = true
626-
break actions
627+
break targetPodBackupActions
627628
case dpv1alpha1.ActionPhaseRunning:
628629
waiting = true
629-
break actions
630+
break targetPodBackupActions
630631
}
631632
}
632633
}

0 commit comments

Comments
 (0)