From cbdca3d141f32864cb67acfd8043ba375474266a Mon Sep 17 00:00:00 2001 From: Greg Daues Date: Sun, 11 Jan 2026 18:48:02 -0800 Subject: [PATCH 1/2] DM-53743: changes for cmd line option to alter condor configuration --- python/lsst/ctrl/execute/allocatorParser.py | 8 ++++++++ python/lsst/ctrl/execute/slurmPlugin.py | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/python/lsst/ctrl/execute/allocatorParser.py b/python/lsst/ctrl/execute/allocatorParser.py index aec8be1..ca08299 100644 --- a/python/lsst/ctrl/execute/allocatorParser.py +++ b/python/lsst/ctrl/execute/allocatorParser.py @@ -225,6 +225,14 @@ def parseArgs(self, basename) -> argparse.Namespace: default=None, help="target a particular Slurm reservation", ) + parser.add_argument( + "--append-condor", + action="store", + dest="appendcondor", + type=str, + default=None, + help="extra condor configuration to append to the glidein configuration", + ) parser.add_argument( "-d", "--dynamic", diff --git a/python/lsst/ctrl/execute/slurmPlugin.py b/python/lsst/ctrl/execute/slurmPlugin.py index 0109eb4..42364dc 100644 --- a/python/lsst/ctrl/execute/slurmPlugin.py +++ b/python/lsst/ctrl/execute/slurmPlugin.py @@ -267,6 +267,17 @@ def loadSlurm(self, name): else: self.defaults["PACK_BLOCK"] = "Rank = TotalCpus - Cpus" + if self.opts.appendcondor is None: + self.defaults["CONDOR_CONFIG_BLOCK"] = "#" + else: + condorConfigName = ResourcePath(self.opts.appendcondor) + with condorConfigName.open() as f: + lines = f.readlines() + block = "" + for line in lines: + block += line + self.defaults["CONDOR_CONFIG_BLOCK"] = block + # handle dynamic slot block template: # 1) if it isn't specified, just put a comment in its place # 2) if it's specified, but without a filename, use the default From 5d2ff7e2625f40a16310794df5932886f6b359ee Mon Sep 17 00:00:00 2001 From: Greg Daues Date: Mon, 12 Jan 2026 12:09:05 -0800 Subject: [PATCH 2/2] DM-53743: add to test to include appendcondor option --- tests/test_allocatorParser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_allocatorParser.py b/tests/test_allocatorParser.py index e34f092..84a34a7 100644 --- a/tests/test_allocatorParser.py +++ b/tests/test_allocatorParser.py @@ -46,6 +46,8 @@ def test1(self): "sdfmilan003", "--nodelist", "sdfmilan004", + "--append-condor", + "testcondorconfig", "-q", "normal", "-O", @@ -63,6 +65,7 @@ def test1(self): self.assertEqual(args.maximumWallClock, "00:30:00") self.assertEqual(args.exclude, "sdfmilan003") self.assertEqual(args.nodelist, "sdfmilan004") + self.assertEqual(args.appendcondor, "testcondorconfig") self.assertEqual(args.queue, "normal") self.assertEqual(args.outputLog, "outlog") self.assertEqual(args.errorLog, "errlog")