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 c0cb14d
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions Pilot/pilotTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

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 c0cb14d

Please sign in to comment.