From 2bc597ea6b89f074dd4cee4d06dcb2aa5c8792f2 Mon Sep 17 00:00:00 2001 From: sp-yduck Date: Sat, 1 Feb 2025 10:27:27 +0000 Subject: [PATCH] fix nil map --- cloud/scheduler/scheduler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud/scheduler/scheduler.go b/cloud/scheduler/scheduler.go index ba35b2a..f3e90df 100644 --- a/cloud/scheduler/scheduler.go +++ b/cloud/scheduler/scheduler.go @@ -342,7 +342,7 @@ func (s *Scheduler) RunFilterPlugins(ctx context.Context, state *framework.Cycle func (s *Scheduler) RunScorePlugins(ctx context.Context, state *framework.CycleState, config api.VirtualMachineCreateOptions, nodes []*api.Node) (framework.NodeScoreList, *framework.Status) { s.logger.Info("scoring proxmox node") status := framework.NewStatus() - var scoresMap map[string](map[int]framework.NodeScore) + scoresMap := make(map[string](map[int]framework.NodeScore)) nodeInfos, err := framework.GetNodeInfoList(ctx, s.client) if err != nil { status.SetCode(1)