mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-12-05 07:26:56 +00:00
Merge pull request #95066 from SataQiu/wrap-errors-2020092502
Wrap errors for NodeLabel, NodePorts, NodePreferAvoidPods and NodeResourcesBalancedAllocation plugins
This commit is contained in:
@@ -49,7 +49,7 @@ func (ba *BalancedAllocation) Name() string {
|
||||
func (ba *BalancedAllocation) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status) {
|
||||
nodeInfo, err := ba.handle.SnapshotSharedLister().NodeInfos().Get(nodeName)
|
||||
if err != nil {
|
||||
return 0, framework.NewStatus(framework.Error, fmt.Sprintf("getting node %q from Snapshot: %v", nodeName, err))
|
||||
return 0, framework.AsStatus(fmt.Errorf("getting node %q from Snapshot: %w", nodeName, err))
|
||||
}
|
||||
|
||||
// ba.score favors nodes with balanced resource usage rate.
|
||||
|
||||
Reference in New Issue
Block a user