From 8cdde1ef338d53a0d0c252d0fcf6902cef7683a6 Mon Sep 17 00:00:00 2001 From: lili Date: Sat, 25 Nov 2023 17:30:02 +0800 Subject: [PATCH] update parameter BestEffort of taskInfo after changing parameter InitResreq Signed-off-by: lili --- pkg/scheduler/cache/event_handlers.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/scheduler/cache/event_handlers.go b/pkg/scheduler/cache/event_handlers.go index 133c80e854..6f76cd91e7 100644 --- a/pkg/scheduler/cache/event_handlers.go +++ b/pkg/scheduler/cache/event_handlers.go @@ -228,6 +228,8 @@ func (sc *SchedulerCache) NewTaskInfo(pod *v1.Pod) (*schedulingapi.TaskInfo, err if err := sc.addPodCSIVolumesToTask(taskInfo); err != nil { return taskInfo, err } + // Update BestEffort because the InitResreq maybe changes + taskInfo.BestEffort = taskInfo.InitResreq.IsEmpty() return taskInfo, nil }