Fix an issue that pod may be added to backoffQ

This commit is contained in:
Wei Huang
2022-11-07 23:11:34 -08:00
parent c36127e330
commit 0f66366aff
2 changed files with 15 additions and 2 deletions

View File

@@ -441,6 +441,9 @@ func (p *PriorityQueue) activate(pod *v1.Pod) bool {
// isPodBackingoff returns true if a pod is still waiting for its backoff timer.
// If this returns true, the pod should not be re-tried.
func (p *PriorityQueue) isPodBackingoff(podInfo *framework.QueuedPodInfo) bool {
if podInfo.Gated {
return false
}
boTime := p.getBackoffTime(podInfo)
return boTime.After(p.clock.Now())
}