sched: retry unschedule pods immediately after a waiting pod's deletion

This commit is contained in:
Wei Huang
2021-07-19 15:46:55 -07:00
parent ebc87c39d3
commit dc079acc2b
8 changed files with 312 additions and 101 deletions

View File

@@ -1092,11 +1092,13 @@ func (f *frameworkImpl) GetWaitingPod(uid types.UID) framework.WaitingPod {
}
// RejectWaitingPod rejects a WaitingPod given its UID.
func (f *frameworkImpl) RejectWaitingPod(uid types.UID) {
waitingPod := f.waitingPods.get(uid)
if waitingPod != nil {
// The returned value indicates if the given pod is waiting or not.
func (f *frameworkImpl) RejectWaitingPod(uid types.UID) bool {
if waitingPod := f.waitingPods.get(uid); waitingPod != nil {
waitingPod.Reject("", "removed")
return true
}
return false
}
// HasFilterPlugins returns true if at least one filter plugin is defined.