mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 01:40:07 +00:00
fix a scheduler preemption issue that victim is not patched properly
This commit is contained in:
parent
099a88370d
commit
f6a11da279
@ -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