From c17daf058e1cfcff1004740e87c0d8f11cbf5da9 Mon Sep 17 00:00:00 2001 From: "Xavier Pillons (MSFT)" Date: Mon, 4 Dec 2023 14:01:10 +0100 Subject: [PATCH] restart munge if socket file is missing --- .../roles/slurm/tasks/cyclecloud-client_3.0.x.yml | 12 ++++++++++++ .../roles/slurm/tasks/cyclecloud-server_3.0.x.yml | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/playbooks/roles/slurm/tasks/cyclecloud-client_3.0.x.yml b/playbooks/roles/slurm/tasks/cyclecloud-client_3.0.x.yml index 5d61545dc..32ef31d1d 100644 --- a/playbooks/roles/slurm/tasks/cyclecloud-client_3.0.x.yml +++ b/playbooks/roles/slurm/tasks/cyclecloud-client_3.0.x.yml @@ -70,3 +70,15 @@ delay: 10 register: result until: result.rc == 0 + +# restart munge if file /var/run/munge/munge.socket.2 does not exist +- name: restart munge + shell: | + set -e + if [ ! -f /var/run/munge/munge.socket.2 ]; then + systemctl restart munge + fi + retries: 5 + delay: 10 + register: result + until: result.rc == 0 diff --git a/playbooks/roles/slurm/tasks/cyclecloud-server_3.0.x.yml b/playbooks/roles/slurm/tasks/cyclecloud-server_3.0.x.yml index df647e5cf..d13ffef2d 100644 --- a/playbooks/roles/slurm/tasks/cyclecloud-server_3.0.x.yml +++ b/playbooks/roles/slurm/tasks/cyclecloud-server_3.0.x.yml @@ -132,3 +132,15 @@ delay: 10 register: result until: result.rc == 0 + +# restart munge if file /var/run/munge/munge.socket.2 does not exist +- name: restart munge + shell: | + set -e + if [ ! -f /var/run/munge/munge.socket.2 ]; then + systemctl restart munge + fi + retries: 5 + delay: 10 + register: result + until: result.rc == 0 \ No newline at end of file