From 4903810b18ac693bce67b686d0144223f61bcf0c Mon Sep 17 00:00:00 2001 From: xieyanke Date: Tue, 4 Feb 2025 22:38:20 +0800 Subject: [PATCH 1/4] Fix: fix an issue where the wrong action name could not be ignored Signed-off-by: xieyanke --- pkg/scheduler/util.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/scheduler/util.go b/pkg/scheduler/util.go index 57c03c4d53..0af6727b1f 100644 --- a/pkg/scheduler/util.go +++ b/pkg/scheduler/util.go @@ -23,6 +23,7 @@ import ( "strings" "gopkg.in/yaml.v2" + "k8s.io/klog/v2" "volcano.sh/volcano/pkg/scheduler/conf" "volcano.sh/volcano/pkg/scheduler/framework" @@ -80,7 +81,7 @@ func UnmarshalSchedulerConf(confStr string) ([]framework.Action, []conf.Tier, [] if action, found := framework.GetAction(strings.TrimSpace(actionName)); found { actions = append(actions, action) } else { - return nil, nil, nil, nil, fmt.Errorf("failed to find Action %s, ignore it", actionName) + klog.Errorf("Failed to find Action %s, ignore it", actionName) } } From de50315b9ce4bc1cd799a19d7391832e8fea047b Mon Sep 17 00:00:00 2001 From: SataQiu Date: Fri, 14 Feb 2025 17:42:50 +0800 Subject: [PATCH 2/4] scheduler: correct mismatched error message Signed-off-by: SataQiu --- pkg/scheduler/cache/cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/scheduler/cache/cache.go b/pkg/scheduler/cache/cache.go index 4630667b09..9c3464ed71 100644 --- a/pkg/scheduler/cache/cache.go +++ b/pkg/scheduler/cache/cache.go @@ -864,7 +864,7 @@ func (sc *SchedulerCache) Evict(taskInfo *schedulingapi.TaskInfo, reason string) node, found := sc.Nodes[task.NodeName] if !found { - return fmt.Errorf("failed to bind Task %v to host %v, host does not exist", + return fmt.Errorf("failed to evict Task %v from host %v, host does not exist", task.UID, task.NodeName) } From 15ebb45eee173357926d0be5eb84580bdcb23301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=87=AF?= Date: Fri, 14 Feb 2025 16:12:12 +0800 Subject: [PATCH 3/4] skip unavailable jobs during the close session step #4011 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王凯 --- pkg/scheduler/plugins/gang/gang.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/scheduler/plugins/gang/gang.go b/pkg/scheduler/plugins/gang/gang.go index 21223e2484..cba297c75b 100644 --- a/pkg/scheduler/plugins/gang/gang.go +++ b/pkg/scheduler/plugins/gang/gang.go @@ -163,6 +163,10 @@ func (gp *gangPlugin) OnSessionClose(ssn *framework.Session) { var unreadyTaskCount int32 var unScheduleJobCount int for _, job := range ssn.Jobs { + // skip the jobs that have no tasks. + if len(job.Tasks) == 0 { + continue + } if !job.IsReady() { schedulableTaskNum := func() (num int32) { for _, task := range job.TaskStatusIndex[api.Pending] { From e92dba91508318d1b53d0a26b041d114277633f3 Mon Sep 17 00:00:00 2001 From: weipeng Date: Fri, 24 Jan 2025 14:28:01 +0800 Subject: [PATCH 4/4] add helm values scheduler_plugins_dir Signed-off-by: weapons97 --- installer/README.md | 1 + installer/helm/chart/volcano/templates/scheduler.yaml | 3 +++ installer/helm/chart/volcano/values.yaml | 1 + 3 files changed, 5 insertions(+) diff --git a/installer/README.md b/installer/README.md index a94a9774b5..808145c7a7 100644 --- a/installer/README.md +++ b/installer/README.md @@ -130,6 +130,7 @@ The following are the list configurable parameters of Volcano Chart and their de |`custom.controller_log_level`|Settings log print level for Controller|`4`| |`custom.scheduler_resources`|Resources for Scheduler pods|`~`| |`custom.scheduler_log_level`|Settings log print level for Scheduler|`3`| +|`custom.scheduler_plugins_dir`| Settings dir for the Scheduler to load custom plugins|``| |`custom.webhooks_namespace_selector_expressions`|Additional namespace selector expressions for Volcano admission webhooks|`~`| |`service.ipFamilyPolicy`|Settings service the family policy|``| |`service.ipFamilies`|Settings service the address families|`[]`| diff --git a/installer/helm/chart/volcano/templates/scheduler.yaml b/installer/helm/chart/volcano/templates/scheduler.yaml index 68810c96b9..540cda85f9 100644 --- a/installer/helm/chart/volcano/templates/scheduler.yaml +++ b/installer/helm/chart/volcano/templates/scheduler.yaml @@ -201,6 +201,9 @@ spec: {{- if .Values.custom.scheduler_node_worker_threads }} - --node-worker-threads={{.Values.custom.scheduler_node_worker_threads}} {{- end }} + {{- if .Values.custom.scheduler_plugins_dir }} + - --plugins-dir={{ .Values.custom.scheduler_plugins_dir }} + {{- end }} - -v={{.Values.custom.scheduler_log_level}} - 2>&1 env: diff --git a/installer/helm/chart/volcano/values.yaml b/installer/helm/chart/volcano/values.yaml index 3593802460..8ab586c612 100644 --- a/installer/helm/chart/volcano/values.yaml +++ b/installer/helm/chart/volcano/values.yaml @@ -21,6 +21,7 @@ custom: scheduler_enable: true scheduler_replicas: 1 scheduler_metrics_enable: true + scheduler_plugins_dir: "" scheduler_name: ~ leader_elect_enable: false controller_kube_api_qps: 50