Skip to content

Commit b6f1138

Browse files
authored
Merge pull request kubernetes#89111 from alculquicondor/fix/nominated_unschedulable
Set unschedulable Condition after setting nominated Node
2 parents 2b63c09 + 4d6af4d commit b6f1138

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/scheduler/scheduler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,6 @@ func (sched *Scheduler) scheduleOne(ctx context.Context) {
573573
defer cancel()
574574
scheduleResult, err := sched.Algorithm.Schedule(schedulingCycleCtx, prof, state, pod)
575575
if err != nil {
576-
sched.recordSchedulingFailure(prof, podInfo.DeepCopy(), err, v1.PodReasonUnschedulable, err.Error())
577576
// Schedule() may have failed because the pod would not fit on any host, so we try to
578577
// preempt, with the expectation that the next time the pod is tried for scheduling it
579578
// will fit due to the preemption. It is also possible that a different pod will schedule
@@ -597,6 +596,7 @@ func (sched *Scheduler) scheduleOne(ctx context.Context) {
597596
klog.Errorf("error selecting node for pod: %v", err)
598597
metrics.PodScheduleErrors.Inc()
599598
}
599+
sched.recordSchedulingFailure(prof, podInfo.DeepCopy(), err, v1.PodReasonUnschedulable, err.Error())
600600
return
601601
}
602602
metrics.SchedulingAlgorithmLatency.Observe(metrics.SinceInSeconds(start))

0 commit comments

Comments
 (0)