From c0cb14d34825f11e655acd63afee5407bba92c1b Mon Sep 17 00:00:00 2001 From: aldbr Date: Tue, 26 Mar 2024 17:47:04 +0100 Subject: [PATCH] fix: use another env var to spot pilots running in htcondor --- Pilot/pilotTools.py | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/Pilot/pilotTools.py b/Pilot/pilotTools.py index 6c3fc88e..76e886cf 100644 --- a/Pilot/pilotTools.py +++ b/Pilot/pilotTools.py @@ -271,24 +271,14 @@ def getSubmitterInfo(ceName): flavour = "SSH%s" % batchSystemType pilotReference = "sshslurm://" + ceName + "/" + batchSystemJobID - # Condor - if "CONDOR_JOBID" in os.environ: - batchSystemType = "HTCondor" - batchSystemJobID = os.environ["CONDOR_JOBID"] - batchSystemParameters["InfoPath"] = os.environ.get("_CONDOR_JOB_AD", "Unknown") - - flavour = "SSH%s" % batchSystemType - pilotReference = "sshcondor://" + ceName + "/" + batchSystemJobID - - # # CEs/Batch Systems - # HTCondor - if "HTCONDOR_JOBID" in os.environ: + if "_CONDOR_JOB_AD" in os.environ: batchSystemType = "HTCondor" - batchSystemJobID = os.environ["HTCONDOR_JOBID"] + batchSystemJobID = None # Not available in the environment + batchSystemParameters["InfoPath"] = os.environ["_CONDOR_JOB_AD"] - flavour = "HTCondorCE" - pilotReference = "htcondorce://" + ceName + "/" + batchSystemJobID + flavour = "SSH%s" % batchSystemType + pilotReference = "sshcondor://" + ceName + "/" + os.environ.get("CONDOR_JOBID", pilotReference) # # Local/SSH @@ -311,6 +301,11 @@ def getSubmitterInfo(ceName): # # CEs + # HTCondor + if "HTCONDOR_JOBID" in os.environ: + flavour = "HTCondorCE" + pilotReference = "htcondorce://" + ceName + "/" + os.environ["HTCONDOR_JOBID"] + # ARC if "GRID_GLOBAL_JOBURL" in os.environ: flavour = "ARC"