Skip to content
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
6 changes: 6 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
sed -i "s#VAR_CS#https://lbcertifdirac70.cern.ch:9135/Configuration/Server#g" pilot.json
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
sed -i "s#VAR_PREF_URL_PATTERN#.*\.cern\.ch/.*#g" pilot.json
g_job="testintegrationworkflow${GITHUB_JOB//-/}"
pilotUUID="${g_job//_/}""$(shuf -i 2000-65000 -n 1)"
pilotUUID=$(echo $pilotUUID | rev | cut -c 1-32 | rev)
Expand Down Expand Up @@ -115,6 +116,7 @@ jobs:
sed -i "s#VAR_CS#https://lbcertifdirac70.cern.ch:9135/Configuration/Server#g" pilot.json
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
sed -i "s#VAR_PREF_URL_PATTERN#.*\.cern\.ch/.*#g" pilot.json
g_job="testintegrationworkflow${GITHUB_JOB//-/}"
pilotUUID="${g_job//_/}""$(shuf -i 2000-65000 -n 1)"
pilotUUID=$(echo $pilotUUID | rev | cut -c 1-32 | rev)
Expand Down Expand Up @@ -164,6 +166,7 @@ jobs:
sed -i "s#VAR_CS#https://lbcertifdirac70.cern.ch:9135/Configuration/Server#g" pilot.json
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
sed -i "s#VAR_PREF_URL_PATTERN#.*\.cern\.ch/.*#g" pilot.json
g_job="testintegrationworkflow${GITHUB_JOB//-/}"
pilotUUID="${g_job//_/}""$(shuf -i 2000-65000 -n 1)"
pilotUUID=$(echo $pilotUUID | rev | cut -c 1-32 | rev)
Expand Down Expand Up @@ -221,6 +224,7 @@ jobs:
sed -i "s#VAR_CS#https://lbcertifdirac70.cern.ch:9135/Configuration/Server#g" pilot.json
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
sed -i "s#VAR_PREF_URL_PATTERN#.*\.cern\.ch/.*#g" pilot.json
g_job="testintegrationworkflow${GITHUB_JOB//-/}"
pilotUUID="${g_job//_/}""$(shuf -i 2000-65000 -n 1)"
pilotUUID=$(echo $pilotUUID | rev | cut -c 1-32 | rev)
Expand Down Expand Up @@ -273,6 +277,7 @@ jobs:
sed -i "s#VAR_CS#https://lbcertifdirac70.cern.ch:9135/Configuration/Server#g" pilot.json
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
sed -i "s#VAR_PREF_URL_PATTERN#.*\.cern\.ch/.*#g" pilot.json
g_job="testintegrationworkflow${GITHUB_JOB//-/}"
pilotUUID="${g_job//_/}""$(shuf -i 2000-65000 -n 1)"
pilotUUID=$(echo $pilotUUID | rev | cut -c 1-32 | rev)
Expand Down Expand Up @@ -334,6 +339,7 @@ jobs:
sed -i "s#VAR_CS#https://lbcertifdirac70.cern.ch:9135/Configuration/Server#g" pilot.json
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
sed -i "s#VAR_PREF_URL_PATTERN#.*\.cern\.ch/.*#g" pilot.json
g_job="testintegrationworkflow${GITHUB_JOB//-/}"
pilotUUID="${g_job//_/}""$(shuf -i 2000-65000 -n 1)"
pilotUUID=$(echo $pilotUUID | rev | cut -c 1-32 | rev)
Expand Down
7 changes: 5 additions & 2 deletions Pilot/pilotCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,8 @@ def _getBasicsCFG(self):
self.cfg.append('-S "%s"' % self.pp.setup)
if self.pp.configServer:
self.cfg.append('-C "%s"' % self.pp.configServer)
if self.pp.preferredURLPatterns:
self.cfg.append("-o /DIRAC/PreferredURLPatterns=%s" % quote(",".join(self.pp.preferredURLPatterns)))
if self.pp.releaseProject:
self.cfg.append('-e "%s"' % self.pp.releaseProject)
self.cfg.append("-o /LocalSite/ReleaseProject=%s" % self.pp.releaseProject)
Expand Down Expand Up @@ -834,7 +836,7 @@ def execute(self):
archScript = self.pp.architectureScript
if self.pp.architectureScript.split(" ")[0] == "dirac-apptainer-exec":
archScript = " ".join(self.pp.architectureScript.split(" ")[1:])

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

if self.pp.architectureScript.split(" ")[0] == "dirac-apptainer-exec":
Expand Down Expand Up @@ -872,10 +874,12 @@ def execute(self):

return localArchitecture


class ConfigureArchitectureWithoutCLI(CommandBase):
"""This command determines the platform.
Separated from the ConfigureDIRAC command for easier extensibility.
"""

def getPlatformString(self):
# Modified to return our desired platform string, R. Graciani
platformTuple = (platform.system(), platform.machine())
Expand Down Expand Up @@ -903,7 +907,6 @@ def execute(self):
self.log.error("Configuration error [ERROR %s]" % str(e))
self.exitWithError(1)


cfg = ["-FDMH"] # force update, skip CA checks, skip CA download, skip VOMS
if self.pp.useServerCertificate:
cfg.append("--UseServerCertificate")
Expand Down
5 changes: 4 additions & 1 deletion Pilot/pilotTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ def executeAndGetOutput(self, cmd, environDict=None):
outChunk = outChunk.decode("utf-8")
# Strip unicode replacement characters
# Ensure correct type conversion in Python 2
outChunk = str(outChunk.replace(u"\ufffd", ""))
outChunk = str(outChunk.replace("\ufffd", ""))
# Avoid potential str() issues in Py2
outChunk = unicode(outChunk) # pylint: disable=undefined-variable
else:
Expand Down Expand Up @@ -908,6 +908,7 @@ def __init__(self):
self.site = ""
self.setup = ""
self.configServer = ""
self.preferredURLPatterns = ""
self.ceName = ""
self.ceType = ""
self.queueName = ""
Expand Down Expand Up @@ -1306,6 +1307,8 @@ def __initJSON2(self):
# the generic one (a list):
self.configServer = ",".join([str(pv).strip() for pv in self.pilotJSON["ConfigurationServers"]])

self.preferredURLPatterns = self.pilotJSON.get("PreferredURLPatterns", self.preferredURLPatterns)

# version(a comma separated values in a string). We take the first one. (the default value defined in the code)
dVersion = pilotOptions.get("Version", self.releaseVersion)
if dVersion:
Expand Down
1 change: 1 addition & 0 deletions Pilot/tests/Test_simplePilotLogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,6 @@ def test_executeAndGetOutput(self, popenMock, argvmock):
self.stdout_mock.truncate()
self.stderr_mock.truncate()


if __name__ == "__main__":
unittest.main()
Loading