mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
improve error msg for predicate meta data
This commit is contained in:
parent
20e97a6b4b
commit
6196f7274e
@ -140,6 +140,7 @@ func (pfactory *PredicateMetadataFactory) GetMetadata(pod *v1.Pod, nodeNameToInf
|
|||||||
// existingPodAntiAffinityMap will be used later for efficient check on existing pods' anti-affinity
|
// existingPodAntiAffinityMap will be used later for efficient check on existing pods' anti-affinity
|
||||||
existingPodAntiAffinityMap, err := getTPMapMatchingExistingAntiAffinity(pod, nodeNameToInfoMap)
|
existingPodAntiAffinityMap, err := getTPMapMatchingExistingAntiAffinity(pod, nodeNameToInfoMap)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
klog.Errorf("[predicate meta data generation] error finding pods whose affinity terms are matched: %v", err)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
// incomingPodAffinityMap will be used later for efficient check on incoming pod's affinity
|
// incomingPodAffinityMap will be used later for efficient check on incoming pod's affinity
|
||||||
@ -395,7 +396,7 @@ func getTPMapMatchingExistingAntiAffinity(pod *v1.Pod, nodeInfoMap map[string]*s
|
|||||||
nodeInfo := nodeInfoMap[allNodeNames[i]]
|
nodeInfo := nodeInfoMap[allNodeNames[i]]
|
||||||
node := nodeInfo.Node()
|
node := nodeInfo.Node()
|
||||||
if node == nil {
|
if node == nil {
|
||||||
catchError(fmt.Errorf("node not found"))
|
catchError(fmt.Errorf("node %q not found", allNodeNames[i]))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, existingPod := range nodeInfo.PodsWithAffinity() {
|
for _, existingPod := range nodeInfo.PodsWithAffinity() {
|
||||||
@ -463,7 +464,7 @@ func getTPMapMatchingIncomingAffinityAntiAffinity(pod *v1.Pod, nodeInfoMap map[s
|
|||||||
nodeInfo := nodeInfoMap[allNodeNames[i]]
|
nodeInfo := nodeInfoMap[allNodeNames[i]]
|
||||||
node := nodeInfo.Node()
|
node := nodeInfo.Node()
|
||||||
if node == nil {
|
if node == nil {
|
||||||
catchError(fmt.Errorf("nodeInfo.Node is nil"))
|
catchError(fmt.Errorf("node %q not found", allNodeNames[i]))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
nodeTopologyPairsAffinityPodsMaps := newTopologyPairsMaps()
|
nodeTopologyPairsAffinityPodsMaps := newTopologyPairsMaps()
|
||||||
|
Loading…
Reference in New Issue
Block a user