Skip to content
Snippets Groups Projects
Commit 1de86ae1 authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Added support for shared slurmtestuser home folder.

parent ee9076f7
No related branches found
No related tags found
No related merge requests found
......@@ -88,7 +88,7 @@ fi
#---------------------
if [ "x$SAFEMODE" == "xFalse" ]; then
echo "[INFO] Executing prestartup scripts (current + parents):"
echo "[INFO] Executing prestartup scripts (parents + current):"
python /prestartup.py
else
echo "[INFO] Not executing prestartup scripts as we are in safemode"
......
......@@ -34,7 +34,9 @@ def shell(command, interactive=False):
prestartup_scripts_path='/prestartup'
def sorted_ls(path):
mtime = lambda f: os.stat(os.path.join(path, f)).st_mtime
return list(sorted(os.listdir(path), key=mtime))
file_list = list(sorted(os.listdir(path), key=mtime))
file_list.reverse()
return file_list
for item in sorted_ls(prestartup_scripts_path):
if item.endswith('.sh'):
......
......@@ -28,3 +28,6 @@ RUN useradd slurmtestuser
RUN mkdir -p /home/slurmtestuser/.ssh
RUN cat /rosetta/.ssh/id_rsa.pub >> /home/slurmtestuser/.ssh/authorized_keys
RUN chown -R slurmtestuser:slurmtestuser /home/slurmtestuser
# Add prestartup
COPY prestartup_slurmbase.sh /prestartup/
\ No newline at end of file
#!/bin/bash
set -e
# "Deactivate" local slurmtestuser home
mv /home/slurmtestuser /home_slurmtestuser_vanilla
# Link slurmtestuser against the home in the shared folder (which will be setup by the master node)
ln -s /shared/home_slurmtestuser /home/slurmtestuser
#!/bin/bash
set -e
# Generic rosetta user shared folder
mkdir -p /shared/rosetta && chown rosetta:rosetta /shared/rosetta
# Shared home for slurmtestuser to simulate a shared home folders filesystem
cp -a /home_slurmtestuser_vanilla /shared/home_slurmtestuser
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment