Skip to content

Commit fedb99c

Browse files
committed
Ensure that Munge service is running
It's easy to get into a situation where the Munge service is enabled and configured but not actually running. After the handler that restarts the Munge service has been flushed, ensure the Munge service is enabled and running. This logic ensures Munge is started (if it is not running) but does not restart it if is running already.
1 parent 3df7f67 commit fedb99c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tasks/runtime.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@
8282
state: "{{ 'started' if openhpc_slurm_service_enabled | bool else 'stopped' }}"
8383
when: openhpc_slurm_service is not none
8484

85+
# Munge state could be unchanged but the service is not running.
86+
# Handle that here.
87+
- name: Ensure Munge services are enabled and started
88+
service:
89+
name: munge
90+
enabled: "{{ openhpc_slurm_service_enabled | bool }}"
91+
state: "{{ 'started' if openhpc_slurm_service_enabled | bool else 'stopped' }}"
92+
8593
# Install OpenHPC runtime
8694
- name: Ensure selected OpenHPC packages are installed
8795
yum:

0 commit comments

Comments
 (0)