From 2c7fc444c07796b9d3e76abafb77845b969499c8 Mon Sep 17 00:00:00 2001
From: Stefano Alberto Russo <stefano.russo@gmail.com>
Date: Sun, 28 Mar 2021 18:24:43 +0200
Subject: [PATCH] Fixed bug in handling presturtup scripts.

---
 services/base/prestartup.py            | 1 -
 services/slurmbase/Dockerfile          | 3 ++-
 services/slurmclustermaster/Dockerfile | 1 +
 services/webapp/Dockerfile             | 1 +
 4 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/services/base/prestartup.py b/services/base/prestartup.py
index 1bcfd45..78edb3f 100644
--- a/services/base/prestartup.py
+++ b/services/base/prestartup.py
@@ -35,7 +35,6 @@ prestartup_scripts_path='/prestartup'
 def sorted_ls(path):
     mtime = lambda f: os.stat(os.path.join(path, f)).st_mtime
     file_list = list(sorted(os.listdir(path), key=mtime))
-    file_list.reverse()
     return file_list
 
 for item in sorted_ls(prestartup_scripts_path):
diff --git a/services/slurmbase/Dockerfile b/services/slurmbase/Dockerfile
index 16126b7..c509200 100755
--- a/services/slurmbase/Dockerfile
+++ b/services/slurmbase/Dockerfile
@@ -30,4 +30,5 @@ 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
+COPY prestartup_slurmbase.sh /prestartup/
+RUN touch -m /prestartup/prestartup_slurmbase.sh
diff --git a/services/slurmclustermaster/Dockerfile b/services/slurmclustermaster/Dockerfile
index 9bdae9e..7c0ddfe 100755
--- a/services/slurmclustermaster/Dockerfile
+++ b/services/slurmclustermaster/Dockerfile
@@ -9,3 +9,4 @@ COPY test.sh /rosetta
 
 # Add prestartup
 COPY prestartup_slurmclustermaster.sh /prestartup/
+RUN touch -m /prestartup/prestartup_slurmclustermaster.sh
diff --git a/services/webapp/Dockerfile b/services/webapp/Dockerfile
index dd5d1a1..dff25b2 100644
--- a/services/webapp/Dockerfile
+++ b/services/webapp/Dockerfile
@@ -78,6 +78,7 @@ COPY supervisord_dregistrytunnel.conf /etc/supervisor/conf.d/
 #------------------------------
 
 COPY prestartup_webapp.sh /prestartup/
+RUN touch -m /prestartup/prestartup_webapp.sh
 
 
 
-- 
GitLab