Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions tasks/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,25 @@
- "_openhpc_slurmdbd_state.stdout == 'inactive'"
- openhpc_enable.database | default(false)

- name: Stop slurmd if configuration has changed
service:
name: "slurmd"
state: stopped
retries: 5
register: slurmd_stop
until: slurmd_stop is success
delay: 30
when:
- openhpc_slurm_service_started | bool
- openhpc_enable.batch | default(false) | bool
- openhpc_slurm_control_host in ansible_play_hosts
- hostvars[openhpc_slurm_control_host].ohpc_slurm_conf.changed or
hostvars[openhpc_slurm_control_host].ohpc_cgroup_conf.changed or
hostvars[openhpc_slurm_control_host].ohpc_gres_conf.changed # noqa no-handler

- name: Flush handler
meta: flush_handlers # This will restart slurmctld while slurmd services are stopped, if needed

- name: Notify handler for slurmd restart
debug:
msg: "notifying handlers" # meta: noop doesn't support 'when'
Expand Down