@@ -417,12 +417,10 @@ func (p *PriorityQueue) isPodWorthRequeuing(logger klog.Logger, pInfo *framework
417
417
// that indicates that the event wants to be effective for the Pod only.
418
418
// Specifically, EventForceActivate could have a target Pod in newObj.
419
419
if newObj != nil {
420
- if pod , ok := newObj .(* v1.Pod ); ok && pod .UID = = pInfo .Pod .UID {
421
- logger . V ( 6 ). Info ( "Worth requeuing because the event is wildcard" , "pod" , klog . KObj ( pInfo . Pod ))
422
- return queueAfterBackoff
420
+ if pod , ok := newObj .(* v1.Pod ); ! ok || pod .UID ! = pInfo .Pod .UID {
421
+ // This wildcard event is not for this Pod.
422
+ return queueSkip
423
423
}
424
- // This wildcard event is not for this Pod.
425
- return queueSkip
426
424
}
427
425
428
426
// If the wildcard event is special one as someone wants to force all Pods to move to activeQ/backoffQ.
@@ -620,10 +618,11 @@ func (p *PriorityQueue) Activate(logger klog.Logger, pods map[string]*v1.Pod) {
620
618
continue
621
619
}
622
620
623
- // If this pod is in-flight, register the activation event so that the pod will be requeued when it comes back.
621
+ // If this pod is in-flight, register the activation event or update moveRequestCycle so that the pod will be requeued when it comes back.
624
622
// Specifically in the in-tree plugins, this is for the scenario with the preemption plugin
625
623
// where the async preemption API calls are all done or fail at some point before the Pod comes back to the queue.
626
624
p .activeQ .addEventsIfPodInFlight (nil , pod , []framework.ClusterEvent {framework .EventForceActivate })
625
+ p .moveRequestCycle = p .activeQ .schedulingCycle ()
627
626
}
628
627
629
628
if activated {
0 commit comments