Grid : Job Environments

When submitting a job through the Condor CE to Condor, the job starts outside of the default shell - i.e., the environment scripts in /etc/profile.d are not sourced and the job might be left with a evry basic environment.

So, we follow KIT's lead (thanks to Max) and start the jobs through a simple job wrapper. Essentially, the job is started from a bash as if it would be a login shell - so that /etc/profile.d get's sourced.

On the worker nodes, we tell the local startds then to run each job through this script.

Job Wrapper

Simple job wrapper /cvmfs/grid.desy.de/release_latest/CentOS/7/x86_64/usr/bin/condor_bash_job_wrapper.sh
#!/bin/bash -l
#
# Wrapper when executing condor jobs
# Run jobs via `bash -l` to force sourcing a login shell including all /etc/profile.d/*.sh scripts
#
set -euo pipefail
exec "$@"


User Job Wrapper Rule

Job Wrapper Rule: /etc/condor/config.d/80_00_bash_wrapper.conf
# https://htcondor.readthedocs.io/en/v8_8/admin-manual/configuration-macros.html?highlight=USER_JOB_WRAPPER#condor-starter-configuration-file-entries
USER_JOB_WRAPPER=/cvmfs/grid.desy.de/release_latest/CentOS/7/x86_64/usr/bin/condor_bash_job_wrapper.sh