From 4868f2764c15d1324056fb6df65739362810f01a Mon Sep 17 00:00:00 2001 From: XaverStiensmeier Date: Mon, 19 Feb 2024 17:03:17 +0100 Subject: [PATCH] Moved explicit slurm start to avoid errors caused by resume and suspend programs not being copied to their final location yet --- .../roles/bibigrid/tasks/042-slurm-server.yml | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/resources/playbook/roles/bibigrid/tasks/042-slurm-server.yml b/resources/playbook/roles/bibigrid/tasks/042-slurm-server.yml index 69f0098f..580aabc4 100644 --- a/resources/playbook/roles/bibigrid/tasks/042-slurm-server.yml +++ b/resources/playbook/roles/bibigrid/tasks/042-slurm-server.yml @@ -70,22 +70,6 @@ - slurmdbd - slurmrestd -- name: Enable slurmdbd and slurmrestd services - systemd: - name: "{{ item }}" - enabled: true - masked: false - state: started - daemon_reload: true - with_items: - - slurmdbd - - slurmrestd - -- name: Start slurm explicit after all dependencies are configured - systemd: - name: slurmctld - state: started - - name: Register Slurm users home dir shell: "set -o pipefail && grep slurm /etc/passwd | cut -d ':' -f 6" register: slurm_home @@ -180,6 +164,31 @@ groups: - ansible +- name: Generate location specific worker userdata + template: + src: slurm/worker_userdata.j2 + dest: "/opt/slurm/userdata_{{ hostvars[item].cloud_identifier }}.txt" + owner: slurm + group: ansible + mode: "0640" + with_items: "{{ groups.vpngtw + groups.master }}" + +- name: Enable slurmdbd and slurmrestd services + systemd: + name: "{{ item }}" + enabled: true + masked: false + state: started + daemon_reload: true + with_items: + - slurmdbd + - slurmrestd + +- name: Start slurm explicit after all dependencies are configured + systemd: + name: slurmctld + state: started + - when: slurm_home.stdout != '/opt/slurm' block: @@ -210,12 +219,3 @@ - slurmd - slurmdbd - slurmrestd - -- name: Generate location specific worker userdata - template: - src: slurm/worker_userdata.j2 - dest: "/opt/slurm/userdata_{{ hostvars[item].cloud_identifier }}.txt" - owner: slurm - group: ansible - mode: "0640" - with_items: "{{ groups.vpngtw + groups.master }}"