Skip to content
Permalink
Browse files

Systemd doesn't kill the old slurm process appropriately - we need to…

… do it ourselves.
  • Loading branch information...
ndmckinley authored and riccardomurri committed Feb 27, 2019
1 parent a045941 commit 2b5a080ad174c191fea1a36a4226b4e2d536fd9c
Showing with 12 additions and 2 deletions.
  1. +12 −2 elasticluster/share/playbooks/roles/slurm-resume.yml
@@ -28,9 +28,19 @@
path: /var/run/slurm-llnl
state: directory
when: 'is_debian_compatible and (is_debian_8_or_later or is_ubuntu_15_10_or_later)'
- service:

- name: Get running slurm processes
shell: "ps -ef | grep -v grep | grep -w slurmd | awk '{print $2}'"
register: running_slurm
when: 'is_debian_compatible and (is_debian_8_or_later or is_ubuntu_15_10_or_later)'
- name: Kill running slurm processes
shell: "kill -9 {{ item }}"
with_items: "{{ running_slurm.stdout_lines }}"
when: 'is_debian_compatible and (is_debian_8_or_later or is_ubuntu_15_10_or_later)'

- systemd:
name: slurmd
state: restarted
state: started
when: 'is_debian_compatible and (is_debian_8_or_later or is_ubuntu_15_10_or_later)'
- service:
name: slurm-llnl

0 comments on commit 2b5a080

Please sign in to comment.
You can’t perform that action at this time.