From 2151cc4a864be382e8d448353a628a6fb36e10b5 Mon Sep 17 00:00:00 2001 From: Ryan Taylor <1686627+rptaylor@users.noreply.github.com> Date: Thu, 20 Jun 2024 13:42:15 -0700 Subject: [PATCH] avoid writing to hardcoded /tmp location --- pandaharvester/harvestercloud/pilots_starter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandaharvester/harvestercloud/pilots_starter.py b/pandaharvester/harvestercloud/pilots_starter.py index 64342647..fd3a995f 100644 --- a/pandaharvester/harvestercloud/pilots_starter.py +++ b/pandaharvester/harvestercloud/pilots_starter.py @@ -319,7 +319,7 @@ def get_configuration(): ) # extend command to tee the stdout and stderr to a file. We need to return the wrapper exit code, not the tee exit code - command += " 2>&1 | tee /tmp/wrapper-wid.log; exit ${PIPESTATUS[0]}" + command += " 2>&1 | tee ${TMPDIR:-/tmp}/wrapper-wid.log; exit ${PIPESTATUS[0]}" try: return_code = subprocess.call(command, shell=True) @@ -330,7 +330,7 @@ def get_configuration(): logging.debug("[main] pilot wrapper done with return code {0} ...".format(return_code)) # upload logs to e.g. panda cache or similar - upload_logs(logs_frontend_w, "/tmp/wrapper-wid.log", destination_name, proxy_path) + upload_logs(logs_frontend_w, WORK_DIR + "/wrapper-wid.log", destination_name, proxy_path) logging.debug("[main] FINISHED") # Exit with the same exit code as the pilot wrapper