Merge pull request #90989 from ahg-g/ahg-err

Count NoNodesAvailable scheduling failure as unschedulable instead of error
This commit is contained in:
Kubernetes Prow Robot 2020-05-12 08:25:08 -07:00 committed by GitHub
commit e5aabaec18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -601,6 +601,9 @@ func (sched *Scheduler) scheduleOne(ctx context.Context) {
// succeeds, the pod should get counted as a success the next time we try to
// schedule it. (hopefully)
metrics.PodScheduleFailures.Inc()
} else if err == core.ErrNoNodesAvailable {
// No nodes available is counted as unschedulable rather than an error.
metrics.PodScheduleFailures.Inc()
} else {
klog.Errorf("error selecting node for pod: %v", err)
metrics.PodScheduleErrors.Inc()