Skip to content

Commit

Permalink
Merge pull request #228 from fstagni/wnVO
Browse files Browse the repository at this point in the history
fix: always adding wnVO option (integration tests)
  • Loading branch information
fstagni authored Feb 8, 2024
2 parents 228f8af + 03630bd commit 0f8239a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
sed -i "s#VAR_USERDN#/DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=alboyer/CN=819281/CN=Alexandre Franck Boyer#g" pilot.json
sed -i "s#VAR_USERDN_GRIDPP#${DIRACUSERDN_GRIDPP}#g" pilot.json
g_job="testintegrationworkflow${GITHUB_JOB//-/}"
pilotUUID="${g_job//_/}""${GITHUB_RUN_ID}"
pilotUUID="${g_job//_/}""$(shuf -i 2000-65000 -n 1)"
pilotUUID=$(echo $pilotUUID | rev | cut -c 1-32 | rev)
python dirac-pilot.py --modules https://github.com/DIRACGrid/DIRAC.git:::DIRAC:::${{ matrix.dirac_branch }} -M 1 -S DIRAC-Certification -N jenkins.cern.ch -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch --cert --certLocation=${GITHUB_WORKSPACE}/Pilot/etc/grid-security --wnVO=${{ matrix.VO }} --pilotUUID="${pilotUUID}" --debug
Expand Down Expand Up @@ -105,9 +105,9 @@ jobs:
sed -i "s#VAR_USERDN#/DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=alboyer/CN=819281/CN=Alexandre Franck Boyer#g" pilot.json
sed -i "s#VAR_USERDN_GRIDPP#${DIRACUSERDN_GRIDPP}#g" pilot.json
g_job="testintegrationworkflow${GITHUB_JOB//-/}"
pilotUUID="${g_job//_/}""${GITHUB_RUN_ID}"
pilotUUID="${g_job//_/}""$(shuf -i 2000-65000 -n 1)"
pilotUUID=$(echo $pilotUUID | rev | cut -c 1-32 | rev)
python dirac-pilot.py -M 1 -S DIRAC-Certification -N jenkins.cern.ch -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch --preinstalledEnvPrefix=/cvmfs/dirac.egi.eu/dirac --cert --certLocation=${GITHUB_WORKSPACE}/Pilot/etc/grid-security --wnVO=dteam --pilotUUID="${pilotUUID}" --debug
python dirac-pilot.py -M 1 -S DIRAC-Certification -N jenkins.cern.ch -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch --preinstalledEnvPrefix=/cvmfs/dirac.egi.eu/dirac --wnVO=dteam --cert --certLocation=${GITHUB_WORKSPACE}/Pilot/etc/grid-security --pilotUUID="${pilotUUID}" --debug
integration-cvmfs_no_env_CEs:
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
sed -i "s#VAR_USERDN#/DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=alboyer/CN=819281/CN=Alexandre Franck Boyer#g" pilot.json
sed -i "s#VAR_USERDN_GRIDPP#${DIRACUSERDN_GRIDPP}#g" pilot.json
g_job="testintegrationworkflow${GITHUB_JOB//-/}"
pilotUUID="${g_job//_/}""${GITHUB_RUN_ID}"
pilotUUID="${g_job//_/}""$(shuf -i 2000-65000 -n 1)"
pilotUUID=$(echo $pilotUUID | rev | cut -c 1-32 | rev)
python dirac-pilot.py -M 1 -S DIRAC-Certification -N ${{ matrix.ce }} -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch --preinstalledEnvPrefix=/cvmfs/dirac.egi.eu/dirac --cert --certLocation=${GITHUB_WORKSPACE}/Pilot/etc/grid-security --wnVO=dteam -o cvmfsOnly --pilotUUID="${pilotUUID}" --debug
Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
sed -i "s#VAR_USERDN#/DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=alboyer/CN=819281/CN=Alexandre Franck Boyer#g" pilot.json
sed -i "s#VAR_USERDN_GRIDPP#${DIRACUSERDN_GRIDPP}#g" pilot.json
g_job="testintegrationworkflow${GITHUB_JOB//-/}"
pilotUUID="${g_job//_/}""${GITHUB_RUN_ID}"
pilotUUID="${g_job//_/}""$(shuf -i 2000-65000 -n 1)"
pilotUUID=$(echo $pilotUUID | rev | cut -c 1-32 | rev)
python dirac-pilot.py --modules https://github.com/DIRACGrid/DIRAC.git:::DIRAC:::integration -M 1 -S DIRAC-Certification -N jenkins-full.cern.ch -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch --wnVO=dteam --cert --certLocation=${GITHUB_WORKSPACE}/Pilot/etc/grid-security --pilotUUID="${pilotUUID}" --debug
Expand Down Expand Up @@ -250,7 +250,7 @@ jobs:
sed -i "s#VAR_USERDN#/DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=alboyer/CN=819281/CN=Alexandre Franck Boyer#g" pilot.json
sed -i "s#VAR_USERDN_GRIDPP#${DIRACUSERDN_GRIDPP}#g" pilot.json
g_job="testintegrationworkflow${GITHUB_JOB//-/}"
pilotUUID="${g_job//_/}""${GITHUB_RUN_ID}"
pilotUUID="${g_job//_/}""$(shuf -i 2000-65000 -n 1)"
pilotUUID=$(echo $pilotUUID | rev | cut -c 1-32 | rev)
python dirac-pilot.py -M 1 -S DIRAC-Certification -N jenkins-full.cern.ch -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch --preinstalledEnvPrefix=/cvmfs/dirac.egi.eu/dirac --cert --certLocation=${GITHUB_WORKSPACE}/Pilot/etc/grid-security --wnVO=${{ matrix.VO }} -o cvmfsOnly --pilotUUID="${pilotUUID}" --debug
Expand Down Expand Up @@ -299,7 +299,7 @@ jobs:
sed -i "s#VAR_USERDN#/DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=alboyer/CN=819281/CN=Alexandre Franck Boyer#g" pilot.json
sed -i "s#VAR_USERDN_GRIDPP#${DIRACUSERDN_GRIDPP}#g" pilot.json
g_job="testintegrationworkflow${GITHUB_JOB//-/}"
pilotUUID="${g_job//_/}""${GITHUB_RUN_ID}"
pilotUUID="${g_job//_/}""$(shuf -i 2000-65000 -n 1)"
pilotUUID=$(echo $pilotUUID | rev | cut -c 1-32 | rev)
python dirac-pilot.py -M 1 -S DIRAC-Certification -N ${{ matrix.ce }} -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch --preinstalledEnvPrefix=/cvmfs/dirac.egi.eu/dirac --StopAfterFailedMatches=1 --cert --certLocation=${GITHUB_WORKSPACE}/Pilot/etc/grid-security --wnVO=dteam -o cvmfsOnly --pilotUUID="${pilotUUID}" --debug
Expand Down Expand Up @@ -360,7 +360,7 @@ jobs:
sed -i "s#VAR_USERDN#/DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=alboyer/CN=819281/CN=Alexandre Franck Boyer#g" pilot.json
sed -i "s#VAR_USERDN_GRIDPP#${DIRACUSERDN_GRIDPP}#g" pilot.json
g_job="testintegrationworkflow${GITHUB_JOB//-/}"
pilotUUID="${g_job//_/}""${GITHUB_RUN_ID}"
pilotUUID="${g_job//_/}""$(shuf -i 2000-65000 -n 1)"
pilotUUID=$(echo $pilotUUID | rev | cut -c 1-32 | rev)
python dirac-pilot.py -M 1 -S DIRAC-Certification -N jenkins-lhcb.cern.ch -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch -e LHCb -l LHCb -E LHCbPilot --cert --certLocation=${GITHUB_WORKSPACE}/Pilot/etc/grid-security --wnVO=LHCb -o lbRunOnly --pilotUUID="${pilotUUID}" --debug
Expand Down Expand Up @@ -408,7 +408,7 @@ jobs:
sed -i "s#VAR_USERDN#/DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=alboyer/CN=819281/CN=Alexandre Franck Boyer#g" pilot.json
sed -i "s#VAR_USERDN_GRIDPP#${DIRACUSERDN_GRIDPP}#g" pilot.json
g_job="testintegrationworkflow${GITHUB_JOB//-/}"
pilotUUID="${g_job//_/}""${GITHUB_RUN_ID}"
pilotUUID="${g_job//_/}""$(shuf -i 2000-65000 -n 1)"
pilotUUID=$(echo $pilotUUID | rev | cut -c 1-32 | rev)
python dirac-pilot.py -M 1 -S DIRAC-Certification -N ${{ matrix.ce }} -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch -e LHCb -l LHCb -E LHCbPilot --preinstalledEnvPrefix=/cvmfs/lhcb.cern.ch/lhcbdirac/ --cert --certLocation=${GITHUB_WORKSPACE}/Pilot/etc/grid-security --wnVO=LHCb -o cvmfsOnly --pilotUUID="${pilotUUID}" --debug
Expand Down Expand Up @@ -456,6 +456,6 @@ jobs:
sed -i "s#VAR_USERDN#/DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=alboyer/CN=819281/CN=Alexandre Franck Boyer#g" pilot.json
sed -i "s#VAR_USERDN_GRIDPP#${DIRACUSERDN_GRIDPP}#g" pilot.json
g_job="testintegrationworkflow${GITHUB_JOB//-/}"
pilotUUID="${g_job//_/}""${GITHUB_RUN_ID}"
pilotUUID="${g_job//_/}""$(shuf -i 2000-65000 -n 1)"
pilotUUID=$(echo $pilotUUID | rev | cut -c 1-32 | rev)
python dirac-pilot.py -M 1 -S DIRAC-Certification -N jenkins-lhcb.cern.ch -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch -e LHCb -l LHCb -E LHCbPilot --preinstalledEnvPrefix=/cvmfs/lhcb.cern.ch/lhcbdirac/ --cert --certLocation=${GITHUB_WORKSPACE}/Pilot/etc/grid-security --wnVO=LHCb -o cvmfsOnly --pilotUUID="${pilotUUID}" --debug
11 changes: 8 additions & 3 deletions Pilot/pilotCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,9 @@ def execute(self):
"""
self.pp.flavour, self.pp.pilotReference, self.pp.batchSystemInfo = getSubmitterInfo(self.pp.ceName)

if not self.pp.pilotReference:
self.pp.pilotReference = self.pp.pilotUUID

self._getBasicsCFG()
self._getSecurityCFG()

Expand Down Expand Up @@ -639,16 +642,18 @@ def __init__(self, pilotParams):

# this variable contains the options that are passed to dirac-admin-add-pilot
self.cfg = []
self.pilotStamp = os.environ.get("DIRAC_PILOT_STAMP", '')
self.pilotStamp = os.environ.get("DIRAC_PILOT_STAMP", self.pp.pilotUUID)

@logFinalizer
def execute(self):
"""Calls dirac-admin-add-pilot"""

if not which("dirac-admin-add-pilot") or not self.pp.pilotReference:
self.log.info("Skipping module")
if not self.pp.pilotReference:
self.log.warn("Skipping module, no pilot reference found")
return

if self.pp.useServerCertificate:
self.cfg.append("-o /DIRAC/Security/UseServerCertificate=yes")
if self.pp.localConfigFile:
self.cfg.extend(["--cfg", self.pp.localConfigFile]) # this file is as input

Expand Down

0 comments on commit 0f8239a

Please sign in to comment.