Skip to content

Commit 52339bf

Browse files
committed
fix nil pointer on node_resource plugin
1 parent e66aef3 commit 52339bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cloud/scheduler/plugins/noderesource/node_resrouce.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,7 @@ func (pl *NodeResource) Score(ctx context.Context, state *framework.CycleState,
2828
maxMem := nodeInfo.Node().MaxMem
2929
u := cpu / float32(maxCPU) * float32(mem/maxMem)
3030
score := int64(1 / u)
31-
return score, nil
31+
status := framework.NewStatus()
32+
status.SetCode(1)
33+
return score, status
3234
}

0 commit comments

Comments
 (0)