Skip to content

Commit d45c707

Browse files
Fix Enroot paths
1 parent 2b3d9f2 commit d45c707

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

playbooks/roles/nvidia-enroot/tasks/oraclelinux-7.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@
4242
dest: /etc/enroot/enroot.conf
4343
state: present
4444
regexp: '^#ENROOT_RUNTIME_PATH.*'
45-
line: 'ENROOT_RUNTIME_PATH {{enroot_top_path}}/enroot/user-$(id -u)'
45+
line: 'ENROOT_RUNTIME_PATH {{enroot_top_path}}/enroot_runtime/user-$(id -u)'
4646
backup: yes
4747

4848
- name: update ENROOT_DATA_PATH
4949
lineinfile:
5050
dest: /etc/enroot/enroot.conf
5151
state: present
5252
regexp: '^#ENROOT_DATA_PATH.*'
53-
line: 'ENROOT_DATA_PATH {{enroot_top_path}}/enroot-data/user-$(id -u)'
53+
line: 'ENROOT_DATA_PATH {{enroot_top_path}}/enroot_data/user-$(id -u)'
5454
backup: yes
5555

5656
- name: update ENROOT_CACHE_PATH
@@ -69,6 +69,7 @@
6969
line: 'ENROOT_TEMP_PATH {{enroot_top_path}}/enroot_tmp'
7070
backup: yes
7171

72+
7273
- name: set permissions on {{enroot_top_path}}
7374
become: true
7475
file:
@@ -79,12 +80,18 @@
7980
group: "{{privilege_group_name}}"
8081
recurse: no
8182

82-
- name: Make sure {{enroot_top_path}}/enroot-data directory exist
83+
84+
- name: Make sure all {{enroot_top_path}} directories exist
8385
file:
84-
path: "{{enroot_top_path}}/enroot-data"
86+
path: "{{enroot_top_path}}/{{item}}"
8587
state: directory
8688
mode: '0775'
8789
owner: opc
8890
group: "{{privilege_group_name}}"
8991
recurse: no
92+
with_items:
93+
- enroot_data
94+
- enroot_tmp
95+
- enroot_cache
96+
- enroot_runtime
9097

playbooks/roles/slurm/templates/prolog.sh.j2

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
#!/bin/sh
2-
runtime_path="$(sudo -u "$SLURM_JOB_USER" sh -c 'echo "/tmp/enroot/user-$(id -u)"')"
3-
mkdir -p "$runtime_path"
4-
chown "$SLURM_JOB_USER:$(id -g "$SLURM_JOB_USER")" "$runtime_path"
5-
chmod 0700 "$runtime_path"
6-
7-
#!/bin/sh
8-
runtime_path="$(sudo -u "$SLURM_JOB_USER" sh -c 'echo "{{enroot_top_path}}/enroot/user-$(id -u)"')"
2+
runtime_path="$(sudo -u "$SLURM_JOB_USER" sh -c 'echo "{{enroot_top_path}}/enroot_runtime/user-$(id -u)"')"
93
mkdir -p "$runtime_path"
104
chown "$SLURM_JOB_USER:$(id -g "$SLURM_JOB_USER")" "$runtime_path"
115
#chmod 777 -R /tmp

0 commit comments

Comments
 (0)