mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Merge pull request #100479 from houjun41544/20210323-InterPodAffinity
Missing return when error
This commit is contained in:
commit
c0778c7e9a
@ -149,12 +149,12 @@ func (pl *InterPodAffinity) PreScore(
|
||||
if hasPreferredAffinityConstraints || hasPreferredAntiAffinityConstraints {
|
||||
allNodes, err = pl.sharedLister.NodeInfos().List()
|
||||
if err != nil {
|
||||
framework.AsStatus(fmt.Errorf("failed to get all nodes from shared lister: %w", err))
|
||||
return framework.AsStatus(fmt.Errorf("failed to get all nodes from shared lister: %w", err))
|
||||
}
|
||||
} else {
|
||||
allNodes, err = pl.sharedLister.NodeInfos().HavePodsWithAffinityList()
|
||||
if err != nil {
|
||||
framework.AsStatus(fmt.Errorf("failed to get pods with affinity list: %w", err))
|
||||
return framework.AsStatus(fmt.Errorf("failed to get pods with affinity list: %w", err))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user