From 508b7f54f7f5255fef9d6294ef554b35b2a16018 Mon Sep 17 00:00:00 2001 From: Xaver Stiensmeier Date: Wed, 13 May 2026 11:10:55 +0200 Subject: [PATCH 1/6] Resolves cyclic services Disables _netdev for ephemeral, which resolves cyclic services, and mounts it via Label, which avoids theoretical issues when working with multiple devices. #734 --- .../roles/bibigrid/tasks/020-disk-server.yaml | 31 ++++++++++++++----- .../roles/bibigrid/tasks/020-disk-worker.yaml | 27 ++++++++++------ 2 files changed, 41 insertions(+), 17 deletions(-) diff --git a/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-server.yaml b/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-server.yaml index c819907b..e150a376 100644 --- a/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-server.yaml +++ b/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-server.yaml @@ -1,8 +1,23 @@ -- name: Create /vol bind mount from /mnt ephemeral - mount: - path: /vol - src: /mnt - fstype: none - opts: bind,auto - state: mounted - when: flavor.ephemeral > 0 +- when: flavor.ephemeral | int > 0 + block: + - name: Ensure /vol/ exists + file: + path: /vol + state: directory + mode: "0777" + + - name: Mount ephemeral to /mnt cleanly + mount: + path: /mnt + src: LABEL=ephemeral0 + fstype: ext4 + opts: defaults,nofail # ,_netdev + state: mounted + + - name: Bind /mnt to /vol/ + mount: + path: /vol + src: /mnt + fstype: none + opts: bind,nosuid,nodev + state: mounted diff --git a/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-worker.yaml b/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-worker.yaml index f33fcb6b..4f259b99 100644 --- a/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-worker.yaml +++ b/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-worker.yaml @@ -1,14 +1,23 @@ -- when: flavor.ephemeral > 0 +- when: flavor.ephemeral | int > 0 block: - - name: Mount ephemeral + - name: Ensure /vol/scratch exists + file: + path: /vol/scratch + state: directory + mode: "0777" + + - name: Mount ephemeral to /mnt cleanly + mount: + path: /mnt + src: LABEL=ephemeral0 + fstype: ext4 + opts: defaults,nofail # ,_netdev + state: mounted + + - name: Bind /vol/scratch to /mnt mount: path: /vol/scratch src: /mnt fstype: none - opts: bind,auto - state: mounted - - name: Set 0777 rights for ephemeral mount - file: - path: /vol/scratch - state: directory - mode: "0o777" + opts: bind,nosuid,nodev + state: mounted \ No newline at end of file From 9c0ec86a387d66b610a0e5ee1d60ce019bcca530 Mon Sep 17 00:00:00 2001 From: Xaver Stiensmeier Date: Wed, 13 May 2026 11:43:45 +0200 Subject: [PATCH 2/6] Please ansible lint --- .../playbook/roles/bibigrid/tasks/020-disk-worker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-worker.yaml b/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-worker.yaml index 4f259b99..70542815 100644 --- a/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-worker.yaml +++ b/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-worker.yaml @@ -20,4 +20,4 @@ src: /mnt fstype: none opts: bind,nosuid,nodev - state: mounted \ No newline at end of file + state: mounted From 1327a2ffa81f5d9f99421d731a680f17701f35c6 Mon Sep 17 00:00:00 2001 From: Xaver Stiensmeier Date: Wed, 13 May 2026 11:49:50 +0200 Subject: [PATCH 3/6] Please pylint --- bibigrid/core/actions/update.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bibigrid/core/actions/update.py b/bibigrid/core/actions/update.py index ad0b27a3..61b3eaa3 100644 --- a/bibigrid/core/actions/update.py +++ b/bibigrid/core/actions/update.py @@ -13,7 +13,8 @@ def update(creator, log): creator.configurations[0], log) log.info(f"Trying to update {master_ip}@{ssh_user} with key {used_private_key}") - # TODO: Verify that update does not impede running jobs, but waiting for all workers to be down should not be necessary if they are not changed + # TODO: Verify that update does not impede running jobs + # waiting for all workers to be down should not be necessary if they are not changed # cluster_dict = dict_clusters(creator.providers, log) # if False and cluster_dict[creator.cluster_id]["workers"]: # workers = [worker['name'] for worker in cluster_dict[creator.cluster_id]["workers"]] From ffc514ed53bdd366bf32c433e57773b128f4654c Mon Sep 17 00:00:00 2001 From: Xaver Stiensmeier Date: Wed, 13 May 2026 11:10:55 +0200 Subject: [PATCH 4/6] Resolves cyclic services Disables _netdev for ephemeral, which resolves cyclic services, and mounts it via Label, which avoids theoretical issues when working with multiple devices. #734 --- .../roles/bibigrid/tasks/020-disk-server.yaml | 31 ++++++++++++++----- .../roles/bibigrid/tasks/020-disk-worker.yaml | 27 ++++++++++------ 2 files changed, 41 insertions(+), 17 deletions(-) diff --git a/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-server.yaml b/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-server.yaml index c819907b..e150a376 100644 --- a/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-server.yaml +++ b/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-server.yaml @@ -1,8 +1,23 @@ -- name: Create /vol bind mount from /mnt ephemeral - mount: - path: /vol - src: /mnt - fstype: none - opts: bind,auto - state: mounted - when: flavor.ephemeral > 0 +- when: flavor.ephemeral | int > 0 + block: + - name: Ensure /vol/ exists + file: + path: /vol + state: directory + mode: "0777" + + - name: Mount ephemeral to /mnt cleanly + mount: + path: /mnt + src: LABEL=ephemeral0 + fstype: ext4 + opts: defaults,nofail # ,_netdev + state: mounted + + - name: Bind /mnt to /vol/ + mount: + path: /vol + src: /mnt + fstype: none + opts: bind,nosuid,nodev + state: mounted diff --git a/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-worker.yaml b/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-worker.yaml index f33fcb6b..4f259b99 100644 --- a/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-worker.yaml +++ b/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-worker.yaml @@ -1,14 +1,23 @@ -- when: flavor.ephemeral > 0 +- when: flavor.ephemeral | int > 0 block: - - name: Mount ephemeral + - name: Ensure /vol/scratch exists + file: + path: /vol/scratch + state: directory + mode: "0777" + + - name: Mount ephemeral to /mnt cleanly + mount: + path: /mnt + src: LABEL=ephemeral0 + fstype: ext4 + opts: defaults,nofail # ,_netdev + state: mounted + + - name: Bind /vol/scratch to /mnt mount: path: /vol/scratch src: /mnt fstype: none - opts: bind,auto - state: mounted - - name: Set 0777 rights for ephemeral mount - file: - path: /vol/scratch - state: directory - mode: "0o777" + opts: bind,nosuid,nodev + state: mounted \ No newline at end of file From eea8667841675cd6e6ae4d96dbe21238b0b0ce2a Mon Sep 17 00:00:00 2001 From: Xaver Stiensmeier Date: Wed, 13 May 2026 11:43:45 +0200 Subject: [PATCH 5/6] Please ansible lint --- .../playbook/roles/bibigrid/tasks/020-disk-worker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-worker.yaml b/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-worker.yaml index 4f259b99..70542815 100644 --- a/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-worker.yaml +++ b/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-worker.yaml @@ -20,4 +20,4 @@ src: /mnt fstype: none opts: bind,nosuid,nodev - state: mounted \ No newline at end of file + state: mounted From e088147424ff1f10268b67ea7ecd806acb9766ad Mon Sep 17 00:00:00 2001 From: Xaver Stiensmeier Date: Wed, 13 May 2026 14:18:44 +0200 Subject: [PATCH 6/6] Activates _netdev for both mount and bindmount --- .../playbook/roles/bibigrid/tasks/020-disk-worker.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-worker.yaml b/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-worker.yaml index 70542815..9cf17caa 100644 --- a/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-worker.yaml +++ b/bibigrid/resources/playbook/roles/bibigrid/tasks/020-disk-worker.yaml @@ -11,7 +11,7 @@ path: /mnt src: LABEL=ephemeral0 fstype: ext4 - opts: defaults,nofail # ,_netdev + opts: defaults,nofail,_netdev state: mounted - name: Bind /vol/scratch to /mnt @@ -19,5 +19,5 @@ path: /vol/scratch src: /mnt fstype: none - opts: bind,nosuid,nodev + opts: bind,nosuid,nodev,_netdev state: mounted