Skip to content

Commit

Permalink
Merge pull request #234 from HSF/20240620-tmpdir
Browse files Browse the repository at this point in the history
avoid writing to hardcoded /tmp location
  • Loading branch information
fbarreir authored Jun 25, 2024
2 parents 0f91124 + 2151cc4 commit 3ff7e50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pandaharvester/harvestercloud/pilots_starter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 3ff7e50

Please sign in to comment.