зеркало из https://github.com/microsoft/pai.git
[Hived]: Filter on full SuggestedNodes (#4271)
This commit is contained in:
Родитель
f2475b882d
Коммит
b7e5d0db29
|
@ -84,6 +84,7 @@ spec:
|
|||
echo \"kind: KubeSchedulerConfiguration\" >> config.yaml &&
|
||||
echo \"schedulerName: hivedscheduler-ds-{{ vc }}\" >> config.yaml &&
|
||||
echo \"disablePreemption: false\" >> config.yaml &&
|
||||
echo \"percentageOfNodesToScore: 100\" >> config.yaml &&
|
||||
echo \"algorithmSource:\" >> config.yaml &&
|
||||
echo \" policy:\" >> config.yaml &&
|
||||
echo \" configMap:\" >> config.yaml &&
|
||||
|
|
|
@ -568,15 +568,18 @@ func (s *HivedScheduler) filterRoutine(args ei.ExtenderArgs) *ei.ExtenderFilterR
|
|||
time.Millisecond)
|
||||
}
|
||||
|
||||
// Return Error to tell K8S Default Scheduler that preemption must not help.
|
||||
// Return fake FailedNodes, so that the waitReason can be exposed along with
|
||||
// other waitReasons generated from K8S Default Scheduler.
|
||||
failedNodes := map[string]string{}
|
||||
waitReason := "Pod is waiting for preemptible or free resource to appear"
|
||||
if result.PodWaitInfo != nil {
|
||||
waitReason += ": " + result.PodWaitInfo.Reason
|
||||
}
|
||||
failedNodes[si.ComponentName] = waitReason
|
||||
|
||||
klog.Infof(logPfx + waitReason)
|
||||
return &ei.ExtenderFilterResult{
|
||||
Error: waitReason,
|
||||
FailedNodes: failedNodes,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче