Hi Andres,IIRC are the pre and post scripts running in their own context but not in the actual job context, so that the exit/return code should not be available.
Maybe it might work to (mis-)use a job wrapper for something like catching the exit codes, but tbh I would have my doubts if it works beyond plain vanilla jobs with Docker universe jobs...
https://htcondor.readthedocs.io/en/latest/admin-manual/configuration-macros.html#USER_JOB_WRAPPER Cheers, Thomas On 29/07/2025 12.16, Andres Ayala wrote:
Hi, I am testing the latest HTCondor release: python3-condor-24.10.0-0.817740.el9.x86_64 condor-24.10.0-0.817740.el9.x86_64And I have found an issue with the âPostScriptâ (or maybe is because I was using incorrectly it from the beginning)I am running the jobs in the docker universe, and I have a PostScript to perform some actions after the container has finished.In this script I need to know the exit status of the container (signal or exit code) and up to now I was able to get that information directly at the working directory with a code like:Import classad2 as classad job_ad = os.environ.get('_CONDOR_JOB_AD') with open(job_ad, 'r') as ft: ÂÂÂ ca = classad.parseOne(ft) toe = ca[âToEâ] if toe[âExitBySignalâ]: ÂÂÂ signal = toe[âExitSignalâ] else: ÂÂÂ code = toe[âExitCodeâ]Now ToE is not any longer in the job ads. In the submitter is not an issue, as I can find the same information in TerminatedNormally, ReturnValue and TerminatedBySignal, but in the PostScript I cannot get that values any longer.I only find: ExitBySignal = false ExitStatus = 0 With that values, no matter how the contaier has really finished. Is the job ad file being updated once the docker container finish? I am using the proper way to recover the exit status of the container? Thanks! AndrÃs AyalaAny email message from EUMETSAT is sent in good faith but shall neither be binding nor construed as constituting a commitment by EUMETSAT, except where provided for in a written agreement or contract or if explicitly stated in the email. Please note that any views or opinions presented in this email are solely those of the sender and do not necessarily represent those of EUMETSAT. This message and any attachments are intended for the sole use of the addressee(s) and may contain confidential and privileged information. Any unauthorised use, disclosure, dissemination or distribution (in whole or in part) of its contents is not permitted. If you received this message in error, please notify the sender and delete it from your system._______________________________________________ HTCondor-users mailing list To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a subject: Unsubscribe The archives can be found at: https://www-auth.cs.wisc.edu/lists/htcondor-users/
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature