fix(scheduling_queue): always put Pods with no unschedulable plugins into activeQ/backoffQ (#119105)

* always put Pods with no unschedulable plugins into activeQ/backoffQ

* address review comments
This commit is contained in:
Kensei Nakada
2023-09-12 01:30:11 +09:00
committed by GitHub
parent b1161a8ac4
commit 0d3eafdfa3
3 changed files with 159 additions and 55 deletions

View File

@@ -2307,8 +2307,11 @@ func TestPreemptWithPermitPlugin(t *testing.T) {
preemptor: st.MakePod().Name("preemptor-pod").Namespace(ns).Priority(highPriority).Req(preemptorReq).ZeroTerminationGracePeriod().Obj(),
},
{
name: "rejecting a waiting pod to trigger retrying unschedulable pods immediately, but the waiting pod itself won't be retried",
maxNumWaitingPodCalled: 1,
// The waiting Pod has once gone through the scheduling cycle,
// and we don't know if it's schedulable or not after it's preempted.
// So, we should retry the scheduling of it so that it won't stuck in the unschedulable Pod pool.
name: "rejecting a waiting pod to trigger retrying unschedulable pods immediately, and the waiting pod itself will be retried",
maxNumWaitingPodCalled: 2,
waitingPod: st.MakePod().Name("waiting-pod").Namespace(ns).Priority(lowPriority).Req(resReq).ZeroTerminationGracePeriod().Obj(),
preemptor: st.MakePod().Name("preemptor-pod").Namespace(ns).Priority(highPriority).Req(preemptorReq).ZeroTerminationGracePeriod().Obj(),
},