Skip to content

Commit 1498b3b

Browse files
committed
add openhpc_slurm_control_host_address
1 parent 46dceaa commit 1498b3b

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ each list element:
2828

2929
`openhpc_slurm_service_started`: Optional boolean. Whether to start slurm services. If set to false, all services will be stopped. Defaults to `openhpc_slurm_service_enabled`.
3030

31-
`openhpc_slurm_control_host`: ansible host name of the controller e.g `"{{ groups['cluster_control'] | first }}"`.
31+
`openhpc_slurm_control_host`: Required string. Ansible inventory hostname (and short hostname) of the controller e.g. `"{{ groups['cluster_control'] | first }}"`.
32+
33+
`openhpc_slurm_control_host_address`: Optional string. IP address or name to use for the `openhpc_slurm_control_host`, e.g. to use a different interface than is resolved from `openhpc_slurm_control_host`.
3234

3335
`openhpc_packages`: additional OpenHPC packages to install.
3436

defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ openhpc_slurm_service_enabled: true
44
openhpc_slurm_service_started: "{{ openhpc_slurm_service_enabled }}"
55
openhpc_slurm_service:
66
openhpc_slurm_control_host: "{{ inventory_hostname }}"
7+
#openhpc_slurm_control_host_address:
78
openhpc_slurm_partitions: []
89
openhpc_cluster_name:
910
openhpc_packages:

tasks/runtime.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
- name: Set slurmctld location for configless operation
157157
lineinfile:
158158
path: /etc/sysconfig/slurmd
159-
line: "SLURMD_OPTIONS='--conf-server {{ openhpc_slurm_control_host }}'"
159+
line: "SLURMD_OPTIONS='--conf-server {{ openhpc_slurm_control_host_address | default(openhpc_slurm_control_host) }}'"
160160
regexp: "^SLURMD_OPTIONS="
161161
create: yes
162162
owner: root

templates/slurm.conf.j2

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
# See the slurm.conf man page for more information.
1010
#
1111
ClusterName={{ openhpc_cluster_name }}
12-
ControlMachine={{ openhpc_slurm_control_host }}
13-
#ControlAddr=
14-
#BackupController=
15-
#BackupAddr=
12+
SlurmctldHost={{ openhpc_slurm_control_host }}{% if openhpc_slurm_control_host_address is defined %}({{ openhpc_slurm_control_host_address }}){% endif %}
1613
#
1714
SlurmUser=slurm
1815
#SlurmdUser=root

0 commit comments

Comments
 (0)