Skip to content

Commit 51b5031

Browse files
committed
ensure cgroup.conf is always next to slurm.conf and allow overriding template
1 parent a34dace commit 51b5031

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,14 @@ For each group (if used) or partition any nodes in an ansible inventory group `<
9999

100100
`openhpc_slurmd_spool_dir`: Optional. Absolute path for slurmd state (`slurm.conf` parameter [SlurmdSpoolDir](https://slurm.schedmd.com/slurm.conf.html#OPT_SlurmdSpoolDir))
101101

102-
`openhpc_slurm_conf_template`: Optional. Path of Jinja template for slurm.conf configuration file. Default is `slurm.conf.j2` template in role. **NB:** The required templating is complex, if just setting specific parameters use `openhpc_config` intead.
102+
`openhpc_slurm_conf_template`: Optional. Path of Jinja template for `slurm.conf` configuration file. Default is `slurm.conf.j2` template in role. **NB:** The required templating is complex, if just setting specific parameters use `openhpc_config` intead.
103103

104104
`openhpc_slurm_conf_path`: Optional. Path to template `slurm.conf` configuration file to. Default `/etc/slurm/slurm.conf`
105105

106+
`openhpc_gres_template`: Optional. Path of Jinja template for `gres.conf` configuration file. Default is `gres.conf.j2` template in role.
107+
108+
`openhpc_cgroup_template`: Optional. Path of Jinja template for `cgroup.conf` configuration file. Default is `cgroup.conf.j2` template in role.
109+
106110
#### Accounting
107111

108112
By default, no accounting storage is configured. OpenHPC v1.x and un-updated OpenHPC v2.0 clusters support file-based accounting storage which can be selected by setting the role variable `openhpc_slurm_accounting_storage_type` to `accounting_storage/filetxt`<sup id="accounting_storage">[1](#slurm_ver_footnote)</sup>. Accounting for OpenHPC v2.1 and updated OpenHPC v2.0 clusters requires the Slurm database daemon, `slurmdbd` (although job completion may be a limited alternative, see [below](#Job-accounting). To enable accounting:

defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ openhpc_retry_delay: 10
1313
openhpc_job_maxtime: '60-0' # quote this to avoid ansible converting some formats to seconds, which is interpreted as minutes by Slurm
1414
openhpc_config: "{{ openhpc_extra_config | default({}) }}"
1515
openhpc_gres_template: gres.conf.j2
16+
openhpc_cgroup_template: cgroup.conf.j2
1617
openhpc_slurm_configless: "{{ 'enable_configless' in openhpc_config.get('SlurmctldParameters', []) }}"
1718

1819
openhpc_state_save_location: /var/spool/slurm

tasks/runtime.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@
137137
- name: Template cgroup.conf
138138
# appears to be required even with NO cgroup plugins: https://slurm.schedmd.com/cgroups.html#cgroup_design
139139
template:
140-
src: cgroup.conf.j2
141-
dest: /etc/slurm/cgroup.conf
140+
src: "{{ openhpc_cgroup_template }}"
141+
dest: "{{ openhpc_slurm_conf_path | dirname }}/cgroup.conf"
142142
mode: "0644" # perms/ownership based off src from ohpc package
143143
owner: root
144144
group: root

0 commit comments

Comments
 (0)