mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 18:58:18 +00:00
Don't fill in NodeToStatusMap with UnschedulableAndUnresolvable
This commit is contained in:
@@ -485,14 +485,12 @@ func (sched *Scheduler) findNodesThatFitPod(ctx context.Context, fwk framework.F
|
||||
nodes := allNodes
|
||||
if !preRes.AllNodes() {
|
||||
nodes = make([]*framework.NodeInfo, 0, len(preRes.NodeNames))
|
||||
for _, n := range allNodes {
|
||||
if !preRes.NodeNames.Has(n.Node().Name) {
|
||||
// We consider Nodes that are filtered out by PreFilterResult as rejected via UnschedulableAndUnresolvable.
|
||||
// We have to record them in NodeToStatusMap so that they won't be considered as candidates in the preemption.
|
||||
diagnosis.NodeToStatusMap[n.Node().Name] = framework.NewStatus(framework.UnschedulableAndUnresolvable, "node is filtered out by the prefilter result")
|
||||
continue
|
||||
for nodeName := range preRes.NodeNames {
|
||||
// PreRes may return nodeName(s) which do not exist; we verify
|
||||
// node exists in the Snapshot.
|
||||
if nodeInfo, err := sched.nodeInfoSnapshot.Get(nodeName); err == nil {
|
||||
nodes = append(nodes, nodeInfo)
|
||||
}
|
||||
nodes = append(nodes, n)
|
||||
}
|
||||
}
|
||||
feasibleNodes, err := sched.findNodesThatPassFilters(ctx, fwk, state, pod, &diagnosis, nodes)
|
||||
|
||||
Reference in New Issue
Block a user