Optimization on running prePreEnqueuePlugins before adding pods into activeQ

This commit is contained in:
lianghao208
2023-02-07 21:37:50 +08:00
parent 3bf42a7aec
commit c01fa8279d
2 changed files with 47 additions and 1 deletions

View File

@@ -521,7 +521,9 @@ func (p *PriorityQueue) flushBackoffQCompleted() {
klog.ErrorS(err, "Unable to pop pod from backoff queue despite backoff completion", "pod", klog.KObj(pod))
break
}
if added, _ := p.addToActiveQ(pInfo); added {
if err := p.activeQ.Add(pInfo); err != nil {
klog.ErrorS(err, "Error adding pod to the active queue", "pod", klog.KObj(pInfo.Pod))
} else {
klog.V(5).InfoS("Pod moved to an internal scheduling queue", "pod", klog.KObj(pod), "event", BackoffComplete, "queue", activeQName)
metrics.SchedulerQueueIncomingPods.WithLabelValues("active", BackoffComplete).Inc()
activated = true