Skip to content

Commit

Permalink
Condor configuration update (#21)
Browse files Browse the repository at this point in the history
* bump to condor update performed on 2023-Feb-28

* Pull a clean copy of the current lpc condor configuration at start up

* Fixed boot strap script to have config generation be inside shell and not bashrc

* Moved CONDOR_CONFIG to only be modified by python, added warning message for if .condor_config is not found

* Bumped the lpcjobqueue version in the bootstrap script
  • Loading branch information
yimuchen authored Mar 6, 2023
1 parent b5ff01d commit 663d674
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 30 deletions.
4 changes: 3 additions & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ else
export COFFEA_IMAGE=\$1
fi
grep -v '^include' /etc/condor/config.d/01_cmslpc_interactive > .condor_config
SINGULARITY_SHELL=\$(which bash) singularity exec -B \${PWD}:/srv -B /cvmfs -B /uscmst1b_scratch --pwd /srv \\
/cvmfs/unpacked.cern.ch/registry.hub.docker.com/\${COFFEA_IMAGE} \\
/bin/bash --rcfile /srv/.bashrc
Expand All @@ -25,7 +27,7 @@ install_env() {
export TMPDIR=\$(mktemp -d -p .)
.env/bin/python -m ipykernel install --user
rm -rf \$TMPDIR && unset TMPDIR
.env/bin/python -m pip install -q git+https://github.com/CoffeaTeam/[email protected].8
.env/bin/python -m pip install -q git+https://github.com/CoffeaTeam/[email protected].9
echo "done."
}
Expand Down
28 changes: 0 additions & 28 deletions src/lpcjobqueue/condor_config

This file was deleted.

5 changes: 4 additions & 1 deletion src/lpcjobqueue/schedd.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
import re

logger = logging.getLogger(__name__)
os.environ["CONDOR_CONFIG"] = os.path.join(os.path.dirname(__file__), "condor_config")
os.environ["CONDOR_CONFIG"] = os.path.join("/srv/.condor_config")
if not os.path.isfile(os.environ['CONDOR_CONFIG']):
logger.warn(f"Condor configuration not found! run the following command outside the singularity instance")
logger.warn(f"grep -v '^include' /etc/condor/config.d/01_cmslpc_interactive > .condor_config")
import htcondor # noqa: E402


Expand Down

0 comments on commit 663d674

Please sign in to comment.