Skip to content

Commit

Permalink
Merge pull request #160 from stackhpc/feature/slurmctld-address
Browse files Browse the repository at this point in the history
Add openhpc_slurm_control_host_address
  • Loading branch information
sjpb authored Jun 29, 2023
2 parents 46dceaa + 1498b3b commit f7e8d1a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ each list element:

`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`.

`openhpc_slurm_control_host`: ansible host name of the controller e.g `"{{ groups['cluster_control'] | first }}"`.
`openhpc_slurm_control_host`: Required string. Ansible inventory hostname (and short hostname) of the controller e.g. `"{{ groups['cluster_control'] | first }}"`.

`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`.

`openhpc_packages`: additional OpenHPC packages to install.

Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ openhpc_slurm_service_enabled: true
openhpc_slurm_service_started: "{{ openhpc_slurm_service_enabled }}"
openhpc_slurm_service:
openhpc_slurm_control_host: "{{ inventory_hostname }}"
#openhpc_slurm_control_host_address:
openhpc_slurm_partitions: []
openhpc_cluster_name:
openhpc_packages:
Expand Down
2 changes: 1 addition & 1 deletion tasks/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
- name: Set slurmctld location for configless operation
lineinfile:
path: /etc/sysconfig/slurmd
line: "SLURMD_OPTIONS='--conf-server {{ openhpc_slurm_control_host }}'"
line: "SLURMD_OPTIONS='--conf-server {{ openhpc_slurm_control_host_address | default(openhpc_slurm_control_host) }}'"
regexp: "^SLURMD_OPTIONS="
create: yes
owner: root
Expand Down
5 changes: 1 addition & 4 deletions templates/slurm.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
# See the slurm.conf man page for more information.
#
ClusterName={{ openhpc_cluster_name }}
ControlMachine={{ openhpc_slurm_control_host }}
#ControlAddr=
#BackupController=
#BackupAddr=
SlurmctldHost={{ openhpc_slurm_control_host }}{% if openhpc_slurm_control_host_address is defined %}({{ openhpc_slurm_control_host_address }}){% endif %}
#
SlurmUser=slurm
#SlurmdUser=root
Expand Down

0 comments on commit f7e8d1a

Please sign in to comment.