Skip to content

Commit e5aabae

Browse files
authored
Merge pull request kubernetes#90989 from ahg-g/ahg-err
Count NoNodesAvailable scheduling failure as unschedulable instead of error
2 parents 53ba2ce + c3be8fe commit e5aabae

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/scheduler/scheduler.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,9 @@ func (sched *Scheduler) scheduleOne(ctx context.Context) {
601601
// succeeds, the pod should get counted as a success the next time we try to
602602
// schedule it. (hopefully)
603603
metrics.PodScheduleFailures.Inc()
604+
} else if err == core.ErrNoNodesAvailable {
605+
// No nodes available is counted as unschedulable rather than an error.
606+
metrics.PodScheduleFailures.Inc()
604607
} else {
605608
klog.Errorf("error selecting node for pod: %v", err)
606609
metrics.PodScheduleErrors.Inc()

0 commit comments

Comments
 (0)