mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Merge pull request #126691 from Huang-Wei/automated-cherry-pick-of-#126644-upstream-release-1.31
Automated cherry pick of #126644: fix a scheduler preemption issue that victim is not patched
This commit is contained in:
commit
60a402c924
@ -366,7 +366,7 @@ func (ev *Evaluator) prepareCandidate(ctx context.Context, c Candidate, pod *v1.
|
|||||||
Reason: v1.PodReasonPreemptionByScheduler,
|
Reason: v1.PodReasonPreemptionByScheduler,
|
||||||
Message: fmt.Sprintf("%s: preempting to accommodate a higher priority pod", pod.Spec.SchedulerName),
|
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)
|
updated := apipod.UpdatePodCondition(newStatus, condition)
|
||||||
if updated {
|
if updated {
|
||||||
if err := util.PatchPodStatus(ctx, cs, victim, newStatus); err != nil {
|
if err := util.PatchPodStatus(ctx, cs, victim, newStatus); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user