Skip to content

Commit

Permalink
Merge branch 'master' into backfill-bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
hansongChina authored Feb 25, 2025
2 parents 2937453 + 9a1de2c commit 276990b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions installer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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|`[]`|
Expand Down
3 changes: 3 additions & 0 deletions installer/helm/chart/volcano/templates/scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions installer/helm/chart/volcano/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/scheduler/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
4 changes: 4 additions & 0 deletions pkg/scheduler/plugins/gang/gang.go
Original file line number Diff line number Diff line change
Expand Up @@ -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] {
Expand Down
3 changes: 2 additions & 1 deletion pkg/scheduler/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 276990b

Please # to comment.