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"]] 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..9cf17caa 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 + opts: bind,nosuid,nodev,_netdev state: mounted - - name: Set 0777 rights for ephemeral mount - file: - path: /vol/scratch - state: directory - mode: "0o777"