Skip to content

Commit

Permalink
Update slurm service to auto restart after 30s (#1819)
Browse files Browse the repository at this point in the history
  • Loading branch information
xpillons authored Jan 23, 2024
1 parent 5a7c18b commit 85b2e59
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions playbooks/roles/slurm/tasks/slurmserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,26 @@
state: present
firstmatch: yes

- name: Update slurm service to auto restart
lineinfile:
path: /usr/lib/systemd/system/slurmctld.service
insertafter: 'ExecStart='
line: 'Restart=always'
state: present
firstmatch: yes

- name: Update slurm service to auto restart after 30 seconds
lineinfile:
path: /usr/lib/systemd/system/slurmctld.service
insertafter: 'Restart='
line: 'RestartSec=30'
state: present
firstmatch: yes

- name: restart daemon-reload
shell: |
systemctl daemon-reload
- name: ensure slurmctld is running.
service:
name: slurmctld
Expand Down

0 comments on commit 85b2e59

Please sign in to comment.