Skip to content

Commit

Permalink
Merge pull request kubernetes#126693 from Huang-Wei/automated-cherry-…
Browse files Browse the repository at this point in the history
…pick-of-#126644-upstream-release-1.30

Automated cherry pick of kubernetes#126644: fix a scheduler preemption issue that victim is not patched
  • Loading branch information
k8s-ci-robot authored Aug 15, 2024
2 parents b2c937b + 622b4b2 commit cd0ea55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/scheduler/framework/preemption/preemption.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ func (ev *Evaluator) prepareCandidate(ctx context.Context, c Candidate, pod *v1.
Reason: v1.PodReasonPreemptionByScheduler,
Message: fmt.Sprintf("%s: preempting to accommodate a higher priority pod", pod.Spec.SchedulerName),
}
newStatus := pod.Status.DeepCopy()
newStatus := victim.Status.DeepCopy()
updated := apipod.UpdatePodCondition(newStatus, condition)
if updated {
if err := util.PatchPodStatus(ctx, cs, victim, newStatus); err != nil {
Expand Down

0 comments on commit cd0ea55

Please sign in to comment.