Merge pull request #111016 from HecarimV/fix-kobj-pod-220708

Improve the accuracy of error msg in /pkg/scheduler/internal/queue
This commit is contained in:
Kubernetes Prow Robot 2022-07-11 11:49:47 -07:00 committed by GitHub
commit 3f630c415d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -415,7 +415,7 @@ func (p *PriorityQueue) AddUnschedulableIfNotPresent(pInfo *framework.QueuedPodI
}
if p.moveRequestCycle >= podSchedulingCycle {
if err := p.podBackoffQ.Add(pInfo); err != nil {
return fmt.Errorf("error adding pod %v to the backoff queue: %v", pod.Name, err)
return fmt.Errorf("error adding pod %v to the backoff queue: %v", klog.KObj(pod), err)
}
metrics.SchedulerQueueIncomingPods.WithLabelValues("backoff", ScheduleAttemptFailure).Inc()
} else {