scheduler's NodeInfo tracks PodInfos instead of Pods
This commit is contained in:
@@ -226,9 +226,9 @@ func (f *FakeExtender) selectVictimsOnNodeByExtender(pod *v1.Pod, node *v1.Node)
|
||||
// check if the given pod can be scheduled.
|
||||
podPriority := podutil.GetPodPriority(pod)
|
||||
for _, p := range nodeInfoCopy.Pods() {
|
||||
if podutil.GetPodPriority(p) < podPriority {
|
||||
potentialVictims = append(potentialVictims, p)
|
||||
removePod(p)
|
||||
if podutil.GetPodPriority(p.Pod) < podPriority {
|
||||
potentialVictims = append(potentialVictims, p.Pod)
|
||||
removePod(p.Pod)
|
||||
}
|
||||
}
|
||||
sort.Slice(potentialVictims, func(i, j int) bool { return util.MoreImportantPod(potentialVictims[i], potentialVictims[j]) })
|
||||
|
Reference in New Issue
Block a user