Skip to content

Commit f6a11da

Browse files
committed
fix a scheduler preemption issue that victim is not patched properly
1 parent 099a883 commit f6a11da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/scheduler/framework/preemption/preemption.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ func (ev *Evaluator) prepareCandidate(ctx context.Context, c Candidate, pod *v1.
366366
Reason: v1.PodReasonPreemptionByScheduler,
367367
Message: fmt.Sprintf("%s: preempting to accommodate a higher priority pod", pod.Spec.SchedulerName),
368368
}
369-
newStatus := pod.Status.DeepCopy()
369+
newStatus := victim.Status.DeepCopy()
370370
updated := apipod.UpdatePodCondition(newStatus, condition)
371371
if updated {
372372
if err := util.PatchPodStatus(ctx, cs, victim, newStatus); err != nil {

0 commit comments

Comments
 (0)