Skip to content

Commit

Permalink
Add sackd file override to restart on-failure (#204)
Browse files Browse the repository at this point in the history
* Add sackd file override to restart on-failure

* Update ansible/roles/slurm/tasks/service.yml

Co-authored-by: Tom Downes <[email protected]>

* Update ansible/roles/slurm/tasks/service.yml

Co-authored-by: Tom Downes <[email protected]>

---------

Co-authored-by: Tom Downes <[email protected]>
  • Loading branch information
jvilarru and tpdownes authored Sep 3, 2024
1 parent 75f7375 commit 0041af4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions ansible/roles/slurm/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ slurmrestd_user:
gid: 982

slurmd_override_path: /etc/systemd/system/slurmd.service.d/overrides.conf
sackd_override_path: /etc/systemd/system/sackd.service.d/override.conf
slurmcmd_timeout: 30
handle_services: true
12 changes: 12 additions & 0 deletions ansible/roles/slurm/tasks/service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,15 @@
dest: '{{ slurmd_override_path }}'
mode: 0o644
notify: Reload SystemD configuration

- name: Create sackd override directory
file:
path: '{{ sackd_override_path | dirname }}'
state: directory

- name: Sackd SystemD overrides
template:
src: systemd/sackd_overrides.j2
dest: '{{ sackd_override_path }}'
mode: 0o644
notify: Reload SystemD configuration
3 changes: 3 additions & 0 deletions ansible/roles/slurm/templates/systemd/sackd_overrides.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[Service]
RestartSec=15s
Restart=on-failure

0 comments on commit 0041af4

Please sign in to comment.