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 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) } 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] { 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) } }