Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added parameter for specifying the dirac-architecture script to… #242

Merged
merged 3 commits into from
Mar 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push, pull_request]
jobs:

shellcheck:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
if: github.event_name != 'push' || github.repository == 'DIRACGrid/DIRAC'
timeout-minutes: 10

Expand All @@ -16,7 +16,7 @@ jobs:
find tests/CI -name '*.sh' -print0 | xargs -0 -n1 shellcheck --external-sources;

pycodestyle:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
if: github.event_name != 'push' || github.repository == 'DIRACGrid/Pilot'
timeout-minutes: 10

Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:


pytest:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
if: github.event_name != 'push' || github.repository == 'DIRACGrid/Pilot'
timeout-minutes: 10

Expand All @@ -70,7 +70,7 @@ jobs:


pylint:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
if: github.event_name != 'push' || github.repository == 'DIRACGrid/Pilot'
timeout-minutes: 10

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: integration
on: [push]

jobs:
integration-local_install:
local_install:
runs-on: ubuntu-latest

strategy:
Expand Down Expand Up @@ -51,9 +51,9 @@ jobs:
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



integration-cvmfs:
release_prod_pre-cvmfs:
runs-on: ubuntu-latest

strategy:
Expand Down Expand Up @@ -107,10 +107,10 @@ jobs:
g_job="testintegrationworkflow${GITHUB_JOB//-/}"
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 --wnVO=dteam --cert --certLocation=${GITHUB_WORKSPACE}/Pilot/etc/grid-security --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 --architectureScript=dirac-platform --preinstalledEnvPrefix=/cvmfs/dirac.egi.eu/dirac --wnVO=dteam --cert --certLocation=${GITHUB_WORKSPACE}/Pilot/etc/grid-security --pilotUUID="${pilotUUID}" --debug


integration-cvmfs_no_env_CEs:
release_prod-cvmfs_no_env_CEs:
runs-on: ubuntu-latest

strategy:
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
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


integration-cvmfs_matching:
release_prod_pre-cvmfs_matching:
runs-on: ubuntu-latest

strategy:
Expand Down Expand Up @@ -255,7 +255,7 @@ jobs:
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


integration-cvmfs_matching_CEs:
release_prod-cvmfs_matching_CEs:
runs-on: ubuntu-latest

strategy:
Expand Down Expand Up @@ -362,7 +362,7 @@ jobs:
g_job="testintegrationworkflow${GITHUB_JOB//-/}"
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
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 --architectureScript=dirac-architecture --cert --certLocation=${GITHUB_WORKSPACE}/Pilot/etc/grid-security --wnVO=LHCb -o lbRunOnly --pilotUUID="${pilotUUID}" --debug

ext-lhcb_integration_dirac_installer_no_env:
runs-on: ubuntu-latest
Expand Down
11 changes: 9 additions & 2 deletions Pilot/pilotCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,11 +827,18 @@ def execute(self):
if self.pp.localConfigFile:
cfg.extend(["--cfg", self.pp.localConfigFile]) # this file is as input

architectureCmd = "%s %s -d" % (self.pp.architectureScript, " ".join(cfg))
archScript = self.pp.architectureScript
if self.pp.architectureScript.split(" ")[0] == "dirac-apptainer-exec":
archScript = self.pp.architectureScript.split(" ")[1]

architectureCmd = "%s %s -ddd" % (archScript, " ".join(cfg))

if self.pp.architectureScript.startswith("dirac-apptainer-exec"):
architectureCmd = "dirac-apptainer-exec '%s' %s" % (architectureCmd, " ".join(cfg))

retCode, localArchitecture = self.executeAndGetOutput(architectureCmd, self.pp.installEnv)
if retCode:
self.log.error("There was an error updating the platform [ERROR %d]" % retCode)
self.log.error("There was an error getting the platform [ERROR %d]" % retCode)
self.exitWithError(retCode)
self.log.info("Architecture determined: %s" % localArchitecture.strip().split("\n")[-1])

Expand Down
5 changes: 4 additions & 1 deletion Pilot/pilotTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,7 @@ def __init__(self):
("", "pilotUUID=", "pilot UUID"),
("", "preinstalledEnv=", "preinstalled pilot environment script location"),
("", "preinstalledEnvPrefix=", "preinstalled pilot environment area prefix"),
("", "architectureScript=", "architecture script to use"),
("", "CVMFS_locations=", "comma-separated list of CVMS locations"),
)

Expand Down Expand Up @@ -1029,7 +1030,7 @@ def __checkSecurityDir(self, envName, dirName):
self.installEnv[envName] = candidateDir
os.environ[envName] = candidateDir
return
self.log.debug("%s not found or not a directory" % candidateDir)
self.log.debug("%s empty, or not found, or not a directory" % candidateDir)

if envName in os.environ and safe_listdir(os.environ[envName]):
self.log.debug(
Expand Down Expand Up @@ -1160,6 +1161,8 @@ def __initCommandLine2(self):
self.preinstalledEnv = v
elif o == "--preinstalledEnvPrefix":
self.preinstalledEnvPrefix = v
elif o == "--architectureScript":
self.architectureScript = v
elif o == "--CVMFS_locations":
self.CVMFS_locations = v.split(",")

Expand Down
4 changes: 2 additions & 2 deletions tests/CI/pilot_newSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
"TEST": "CheckWorkerNode, InstallDIRAC, ConfigureBasics, RegisterPilot, CheckCECapabilities, CheckWNCapabilities, ConfigureSite, ConfigureArchitecture, ConfigureCPURequirements",
"TEST-MP": "CheckWorkerNode, InstallDIRAC, ConfigureBasics, RegisterPilot, CheckCECapabilities, CheckWNCapabilities, ConfigureSite, ConfigureArchitecture, ConfigureCPURequirements",
"TEST-FULL": "CheckWorkerNode, InstallDIRAC, ConfigureBasics, RegisterPilot, CheckCECapabilities, CheckWNCapabilities, ConfigureSite, ConfigureArchitecture, ConfigureCPURequirements, LaunchAgent",
"LHCb": "CheckWorkerNode, LHCbInstallDIRAC, LHCbConfigureBasics, RegisterPilot, CheckCECapabilities, LHCbAddCVMFSTags, CheckWNCapabilities, LHCbConfigureSite, LHCbConfigureArchitecture, LHCbConfigureCPURequirements",
"LHCbD": "CheckWorkerNode, InstallDIRAC, LHCbConfigureBasics, RegisterPilot, CheckCECapabilities, LHCbAddCVMFSTags, CheckWNCapabilities, LHCbConfigureSite, LHCbConfigureArchitecture, LHCbConfigureCPURequirements",
"LHCb": "CheckWorkerNode, LHCbInstallDIRAC, LHCbConfigureBasics, RegisterPilot, CheckCECapabilities, LHCbAddCVMFSTags, CheckWNCapabilities, ConfigureSite, LHCbConfigureArchitecture, ConfigureCPURequirements",
"LHCbD": "CheckWorkerNode, InstallDIRAC, LHCbConfigureBasics, RegisterPilot, CheckCECapabilities, LHCbAddCVMFSTags, CheckWNCapabilities, ConfigureSite, LHCbConfigureArchitecture, ConfigureCPURequirements",
"LHCbDD": "CheckWorkerNode, InstallDIRAC, ConfigureBasics, RegisterPilot, CheckCECapabilities, LHCbAddCVMFSTags, CheckWNCapabilities, ConfigureSite, LHCbConfigureArchitecture, ConfigureCPURequirements"
}
}
Expand Down
8 changes: 4 additions & 4 deletions tests/CI/pilot_oldSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
"CheckCECapabilities",
"LHCbAddCVMFSTags",
"CheckWNCapabilities",
"LHCbConfigureSite",
"ConfigureSite",
"LHCbConfigureArchitecture",
"LHCbConfigureCPURequirements"
"ConfigureCPURequirements"
],
"LHCbD": [
"CheckWorkerNode",
Expand All @@ -57,9 +57,9 @@
"CheckCECapabilities",
"LHCbAddCVMFSTags",
"CheckWNCapabilities",
"LHCbConfigureSite",
"ConfigureSite",
"LHCbConfigureArchitecture",
"LHCbConfigureCPURequirements"
"ConfigureCPURequirements"
],
"LHCbDD": [
"CheckWorkerNode",
Expand Down