You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
potentialNodes, unschedulableNodeStatus:=nodesWherePreemptionMightHelp(allNodes, m)
iflen(potentialNodes) ==0 {
logger.V(3).Info("Preemption will not help schedule pod on any node", "pod", klog.KObj(pod))
// In this case, we should clean-up any existing nominated node name of the pod.iferr:=util.ClearNominatedNodeName(ctx, ev.Handler.ClientSet(), pod); err!=nil {
logger.Error(err, "Could not clear the nominatedNodeName field of pod", "pod", klog.KObj(pod))
// We do not return as this error is not critical.
}
returnnil, unschedulableNodeStatus, nil
}
pdbs, err:=getPodDisruptionBudgets(ev.PdbLister)
iferr!=nil {
returnnil, nil, err
}
offset, numCandidates:=ev.GetOffsetAndNumCandidates(int32(len(potentialNodes)))
// nodesWherePreemptionMightHelp returns a list of nodes with failed predicates// that may be satisfied by removing pods from the node.funcnodesWherePreemptionMightHelp(nodes []*framework.NodeInfo, m framework.NodeToStatusMap) ([]*framework.NodeInfo, framework.NodeToStatusMap) {
varpotentialNodes []*framework.NodeInfonodeStatuses:=make(framework.NodeToStatusMap)
for_, node:=rangenodes {
name:=node.Node().Name// We rely on the status by each plugin - 'Unschedulable' or 'UnschedulableAndUnresolvable'// to determine whether preemption may help or not on the node.ifm[name].Code() ==framework.UnschedulableAndUnresolvable {
nodeStatuses[node.Node().Name] =framework.NewStatus(framework.UnschedulableAndUnresolvable, "Preemption is not helpful for scheduling")
continue
}
potentialNodes=append(potentialNodes, node)
}
returnpotentialNodes, nodeStatuses
}
Why is this needed:
reduce the nodes which need to run filter on them
The text was updated successfully, but these errors were encountered:
What would you like to be added:
like K8s preemptations, it first filters out those nodes will not help preemption
https://github.com/kubernetes/kubernetes/blob/dbcbf5e952266479df92c84457781c0a2a688afd/pkg/scheduler/framework/preemption/preemption.go#L223C2-L239
https://github.com/kubernetes/kubernetes/blob/dbcbf5e952266479df92c84457781c0a2a688afd/pkg/scheduler/framework/preemption/preemption.go#L413-L428
Why is this needed:
reduce the nodes which need to run filter on them
The text was updated successfully, but these errors were encountered: