Merge pull request #80018 from snowplayfire/fixnonode-for-predicate

keep processing other nodes for the nil node error
This commit is contained in:
Kubernetes Prow Robot 2019-07-11 04:02:55 -07:00 committed by GitHub
commit 529255865d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -396,8 +396,7 @@ func getTPMapMatchingExistingAntiAffinity(pod *v1.Pod, nodeInfoMap map[string]*s
nodeInfo := nodeInfoMap[allNodeNames[i]]
node := nodeInfo.Node()
if node == nil {
catchError(fmt.Errorf("node %q not found", allNodeNames[i]))
cancel()
klog.Errorf("node %q not found", allNodeNames[i])
return
}
for _, existingPod := range nodeInfo.PodsWithAffinity() {
@ -465,8 +464,7 @@ func getTPMapMatchingIncomingAffinityAntiAffinity(pod *v1.Pod, nodeInfoMap map[s
nodeInfo := nodeInfoMap[allNodeNames[i]]
node := nodeInfo.Node()
if node == nil {
catchError(fmt.Errorf("node %q not found", allNodeNames[i]))
cancel()
klog.Errorf("node %q not found", allNodeNames[i])
return
}
nodeTopologyPairsAffinityPodsMaps := newTopologyPairsMaps()