Merge pull request #110892 from yuanchen8911/prefilter

Refactor scheduler code
This commit is contained in:
Kubernetes Prow Robot 2022-06-30 12:42:42 -07:00 committed by GitHub
commit cfc386c060
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -367,12 +367,12 @@ func (sched *Scheduler) findNodesThatFitPod(ctx context.Context, fwk framework.F
UnschedulablePlugins: sets.NewString(),
}
// Run "prefilter" plugins.
preRes, s := fwk.RunPreFilterPlugins(ctx, state, pod)
allNodes, err := sched.nodeInfoSnapshot.NodeInfos().List()
if err != nil {
return nil, diagnosis, err
}
// Run "prefilter" plugins.
preRes, s := fwk.RunPreFilterPlugins(ctx, state, pod)
if !s.IsSuccess() {
if !s.IsUnschedulable() {
return nil, diagnosis, s.AsError()