Skip to content

Commit f2775cf

Browse files
authored
Merge pull request #8087 from fstagni/90_integration_tests_fixes
[9.0] fix: the configuration and proxy init should be done by the client only
2 parents c3f2274 + 01cd202 commit f2775cf

File tree

8 files changed

+28
-16
lines changed

8 files changed

+28
-16
lines changed

.github/workflows/integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- TEST_NAME: "Force DEncode and MySQL8"
3737
ARGS: DIRAC_USE_JSON_ENCODE=NO MYSQL_VER=mysql:8.0.40
3838
- TEST_NAME: "Backward Compatibility"
39-
ARGS: CLIENT_INSTALLATION_BRANCH=rel-v8r0
39+
ARGS: CLIENT_INSTALLATION_BRANCH=rel-v8r0 PILOT_INSTALLATION_BRANCH=rel-v8r0
4040

4141
steps:
4242
- uses: actions/checkout@v4

tests/CI/install_client.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ echo -e "*** $(date -u) **** Client INSTALLATION START ****\n"
6464
installDIRAC
6565

6666
if [[ -z "${INSTALLATION_BRANCH}" ]]; then
67+
echo 'Generate a pilot proxy, to be used by the pilot'
68+
dirac-proxy-init -g pilot -C /ca/certs/pilot.pem -K /ca/certs/pilot.key "${DEBUG}"
69+
mv /tmp/x509up_u$UID /ca/certs/pilot_proxy
70+
6771
echo -e "*** $(date -u) Getting a non privileged user\n" |& tee -a clientTestOutputs.txt
6872
dirac-proxy-init "${DEBUG}" |& tee -a clientTestOutputs.txt
6973

tests/CI/run_pilot.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,15 @@ set -eo pipefail
88
# IFS=$'\n\t'
99
set -x
1010

11+
echo "Starting run_pilot.sh"
1112
source CONFIG
1213

14+
if [[ -n "${INSTALLATION_BRANCH}" ]]; then
15+
# Do not run this
16+
echo "Not running the DIRAC Pilot"
17+
exit
18+
fi
19+
1320
# Creating "the worker node"
1421
mkdir -p /home/dirac/etc/grid-security/certificates
1522
mkdir -p /home/dirac/etc/grid-security/vomsdir

tests/CI/run_tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ elif [[ "$INSTALLTYPE" == "client" ]]; then
5050
source "${repo_path}/tests/Integration/all_integration_client_tests.sh"
5151
done
5252

53-
elif [[ "$INSTALLTYPE" == "pilot" ]]; then
53+
# if "$INSTALLTYPE" == "pilot" and if INSTALLATION_BRANCH is not set
54+
elif [[ "$INSTALLTYPE" == "pilot" ]] && [[ -z "${INSTALLATION_BRANCH}" ]]; then
5455
# shellcheck source=/dev/null
5556
source /home/dirac/bashrc
5657
# If not unset, assert will not trigger

tests/Jenkins/dirac-cfg-setup-diracx.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env python
22
import argparse
3-
import os
43

54
from diraccfg import CFG
65

tests/Jenkins/dirac-cfg-update-server.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,19 @@
1010

1111
Script.parseCommandLine()
1212

13-
setupName = "dirac-JenkinsSetup"
14-
1513
# Where to store outputs
16-
if not os.path.isdir(f"{setupName}/sandboxes"):
17-
os.makedirs(f"{setupName}/sandboxes")
14+
if not os.path.isdir("sandboxes"):
15+
os.makedirs("sandboxes")
1816

1917
# now updating the CS
2018

2119
from DIRAC.ConfigurationSystem.Client.CSAPI import CSAPI
2220

2321
csAPI = CSAPI()
2422

25-
csAPI.setOption("Systems/WorkloadManagement/Services/SandboxStore/BasePath", f"{setupName}/sandboxes")
23+
csAPI.setOption("Systems/WorkloadManagement/Services/SandboxStore/BasePath", "sandboxes")
2624
csAPI.setOption("Systems/WorkloadManagement/Services/SandboxStore/LogLevel", "DEBUG")
27-
csAPI.setOption("Systems/WorkloadManagement/Services/TornadoSandboxStore/BasePath", f"{setupName}/sandboxes")
25+
csAPI.setOption("Systems/WorkloadManagement/Services/TornadoSandboxStore/BasePath", "sandboxes")
2826
csAPI.setOption("Systems/WorkloadManagement/Services/TornadoSandboxStore/LogLevel", "DEBUG")
2927

3028
# Now setting a SandboxSE as the following:
@@ -63,7 +61,7 @@
6361
csAPI.setOption("Resources/StorageElements/ProductionSandboxSE/DIP/ProtocolName", "DIP")
6462
csAPI.setOption("Resources/StorageElements/ProductionSandboxSE/DIP/Protocol", "dips")
6563
csAPI.setOption("Resources/StorageElements/ProductionSandboxSE/DIP/Access", "remote")
66-
csAPI.setOption("Resources/StorageElements/ProductionSandboxSE/DIP/Path", f"{setupName}/sandboxes")
64+
csAPI.setOption("Resources/StorageElements/ProductionSandboxSE/DIP/Path", "sandboxes")
6765

6866
# Now setting a FileCatalogs section as the following:
6967
# FileCatalogs

tests/Jenkins/dirac_ci.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,10 +396,6 @@ fullInstallDIRAC() {
396396

397397
echo "==> Restarting Configuration Server"
398398
dirac-restart-component Configuration Server -o /DIRAC/Security/UseServerCertificate=True ${DEBUG}
399-
400-
echo 'Generate a pilot proxy, to be used by the pilot'
401-
dirac-proxy-init -g pilot -C /ca/certs/pilot.pem -K /ca/certs/pilot.key ${DEBUG}
402-
mv /tmp/x509up_u$UID /ca/certs/pilot_proxy
403399
}
404400

405401

tests/Jenkins/utilities.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,14 +261,21 @@ installDIRAC() {
261261
echo "$DIRAC"
262262
echo "$PATH"
263263

264-
# now configuring
264+
echo "==> Done installing, now configuring"
265+
265266
if ! dirac-proxy-init --nocs --no-upload; then
266267
echo 'ERROR: dirac-proxy-init failed' >&2
267268
exit 1
268269
fi
270+
271+
configureArgs=()
272+
if [[ "${TEST_DIRACX:-}" = "Yes" ]]; then
273+
configureArgs+=("--LegacyExchangeApiKey=diracx:legacy:InsecureChangeMe")
274+
fi
275+
269276
if [[ -n "${INSTALLATION_BRANCH}" ]]; then
270277
# Use this for (e.g.) running backward-compatibility tests
271-
cmd="dirac-configure -S ${DIRACSETUP} -C ${CSURL} --SkipCAChecks ${CONFIGUREOPTIONS} ${DEBUG}"
278+
cmd="dirac-configure -S ${DIRACSETUP} -C ${CSURL} --SkipCAChecks "${configureArgs[@]}" ${CONFIGUREOPTIONS} ${DEBUG}"
272279
else
273280
cmd="dirac-configure -C ${CSURL} --SkipCAChecks ${CONFIGUREOPTIONS} ${DEBUG}"
274281
fi

0 commit comments

Comments
 (0)