mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
Merge pull request #89111 from alculquicondor/fix/nominated_unschedulable
Set unschedulable Condition after setting nominated Node
This commit is contained in:
commit
b6f11382f5
@ -573,7 +573,6 @@ func (sched *Scheduler) scheduleOne(ctx context.Context) {
|
||||
defer cancel()
|
||||
scheduleResult, err := sched.Algorithm.Schedule(schedulingCycleCtx, prof, state, pod)
|
||||
if err != nil {
|
||||
sched.recordSchedulingFailure(prof, podInfo.DeepCopy(), err, v1.PodReasonUnschedulable, err.Error())
|
||||
// Schedule() may have failed because the pod would not fit on any host, so we try to
|
||||
// preempt, with the expectation that the next time the pod is tried for scheduling it
|
||||
// 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) {
|
||||
klog.Errorf("error selecting node for pod: %v", err)
|
||||
metrics.PodScheduleErrors.Inc()
|
||||
}
|
||||
sched.recordSchedulingFailure(prof, podInfo.DeepCopy(), err, v1.PodReasonUnschedulable, err.Error())
|
||||
return
|
||||
}
|
||||
metrics.SchedulingAlgorithmLatency.Observe(metrics.SinceInSeconds(start))
|
||||
|
Loading…
Reference in New Issue
Block a user