Skip to content

Commit

Permalink
fix: use another env var to spot pilots running in htcondor
Browse files Browse the repository at this point in the history
  • Loading branch information
aldbr committed Mar 27, 2024
1 parent 0c23069 commit 0418480
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions Pilot/pilotTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,25 +271,15 @@ def getSubmitterInfo(ceName):
flavour = "SSH%s" % batchSystemType
pilotReference = "sshslurm://" + ceName + "/" + batchSystemJobID

# Condor
if "CONDOR_JOBID" in os.environ:
# HTCondor
if "_CONDOR_JOB_AD" in os.environ:
batchSystemType = "HTCondor"
batchSystemJobID = os.environ["CONDOR_JOBID"]
batchSystemParameters["InfoPath"] = os.environ.get("_CONDOR_JOB_AD", "Unknown")
batchSystemJobID = None # Not available in the environment
batchSystemParameters["InfoPath"] = os.environ["_CONDOR_JOB_AD"]

flavour = "SSH%s" % batchSystemType
pilotReference = "sshcondor://" + ceName + "/" + batchSystemJobID

# # CEs/Batch Systems

# HTCondor
if "HTCONDOR_JOBID" in os.environ:
batchSystemType = "HTCondor"
batchSystemJobID = os.environ["HTCONDOR_JOBID"]

flavour = "HTCondorCE"
pilotReference = "htcondorce://" + ceName + "/" + batchSystemJobID

# # Local/SSH

# Local submission to the host
Expand All @@ -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"
Expand Down

0 comments on commit 0418480

Please sign in to comment.