Skip to content

Commit

Permalink
sweep: DIRACGrid#7698 feat: added possibility to specify UserEnvVaria…
Browse files Browse the repository at this point in the history
…ble (pilot option) at CE level
  • Loading branch information
fstagni authored and web-flow committed Jun 26, 2024
1 parent baf6c56 commit 6fcacfa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dirac.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -640,9 +640,11 @@ Resources
# Will be added to the pilot configuration as /LocalSite/SharedArea
SharedArea = /cvmfs/lhcb.cern.ch/lib

# For adding Extra environments (only for pilots submitted by SiteDirectors)
UserEnvVariables = DIRACSYSCONFIG:::pilot.cfg,RUCIO_HOME:::/home/dirac/rucio

# for adding some extra pilot options (only for pilots submitted by SiteDirectors)
# the example below will add the environment variable DIRACSYSCONFIG (see :ref:`bashrc_variables`)
ExtraPilotOptions = --userEnvVariables DIRACSYSCONFIG:::pilot.cfg
ExtraPilotOptions = --pilotLogging True

# for adding some generic pilot options (only for pilots submitted by SiteDirectors)
# which will be transleted as "-o" options of the Pilot
Expand Down
3 changes: 3 additions & 0 deletions src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,9 @@ def _getPilotOptions(self, queue: str) -> list[str]:
if "SharedArea" in queueDict:
pilotOptions.append(f"-o '/LocalSite/SharedArea={queueDict['SharedArea']}'")

if "UserEnvVariables" in queueDict:
pilotOptions.append(f"--userEnvVariables={queueDict['UserEnvVariables']}")

if "ExtraPilotOptions" in queueDict:
for extraPilotOption in queueDict["ExtraPilotOptions"].split(","):
pilotOptions.append(extraPilotOption.strip())
Expand Down

0 comments on commit 6fcacfa

Please sign in to comment.