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

[v7r1] ComponentInstaller uses --cfg #4690

Merged
merged 2 commits into from
Aug 6, 2020
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
3 changes: 2 additions & 1 deletion FrameworkSystem/Client/ComponentInstaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -1910,7 +1910,8 @@ def installComponent(self, componentType, system, component, extensions, compone
[[ "%(componentType)s" = "agent" ]] && renice 20 -p $$
#%(bashVariables)s
#
exec python $DIRAC/DIRAC/Core/scripts/dirac-%(componentType)s.py %(system)s/%(component)s %(componentCfg)s < /dev/null
exec python $DIRAC/DIRAC/Core/scripts/dirac-%(componentType)s.py \
%(system)s/%(component)s --cfg %(componentCfg)s < /dev/null
""" % {'bashrc': os.path.join(self.instancePath, 'bashrc'),
'bashVariables': bashVars,
'componentType': componentType,
Expand Down
6 changes: 3 additions & 3 deletions tests/Integration/WorkloadManagementSystem/Test_TimeLeft.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fi
###############################################################################
# Can't find anywhere a batch plugin, not even MJF

$DIRACSCRIPTS/dirac-wms-get-queue-cpu-time $DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/pilot.cfg $DEBUG
$DIRACSCRIPTS/dirac-wms-get-queue-cpu-time --cfg $DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/pilot.cfg $DEBUG

if [[ "${?}" -eq 0 ]]; then
echo -e "\nSuccess\n\n"
Expand All @@ -35,7 +35,7 @@ fi
export MACHINEFEATURES=$DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/sb.cfg
export JOBFEATURES=$DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/sb.cfg

$DIRACSCRIPTS/dirac-wms-get-queue-cpu-time $DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/pilot.cfg $DEBUG
$DIRACSCRIPTS/dirac-wms-get-queue-cpu-time --cfg $DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/pilot.cfg $DEBUG

if [[ "${?}" -eq 0 ]]; then
echo -e "\nSuccess\n\n"
Expand All @@ -51,7 +51,7 @@ fi
export MACHINEFEATURES=$DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/MJF/
export JOBFEATURES=$DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/MJF/

$DIRACSCRIPTS/dirac-wms-get-queue-cpu-time $DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/pilot.cfg $DEBUG
$DIRACSCRIPTS/dirac-wms-get-queue-cpu-time --cfg $DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/pilot.cfg $DEBUG

if [[ "${?}" -eq 0 ]]; then
echo -e "\nSuccess\n\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ python $DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/createJobXMLDescr
# Running the real tests

# OK
$DIRACSCRIPTS/dirac-jobexec jobDescription-OK.xml $DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/pilot.cfg $DEBUG
$DIRACSCRIPTS/dirac-jobexec jobDescription-OK.xml --cfg $DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/pilot.cfg $DEBUG
if [[ "${?}" -eq 0 ]]; then
echo -e "\nSuccess\n\n"
else
Expand All @@ -30,7 +30,7 @@ else
fi

# OK2
$DIRACSCRIPTS/dirac-jobexec jobDescription-OK-multiSteps.xml $DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/pilot.cfg $DEBUG
$DIRACSCRIPTS/dirac-jobexec jobDescription-OK-multiSteps.xml --cfg $DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/pilot.cfg $DEBUG
if [[ "${?}" -eq 0 ]]; then
echo -e "\nSuccess\n\n"
else
Expand All @@ -40,7 +40,7 @@ fi


# FAIL
$DIRACSCRIPTS/dirac-jobexec jobDescription-FAIL.xml $DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/pilot.cfg $DEBUG
$DIRACSCRIPTS/dirac-jobexec jobDescription-FAIL.xml --cfg $DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/pilot.cfg $DEBUG
if [[ "${?}" -eq 111 ]]; then
echo -e "\nSuccess\n\n"
else
Expand All @@ -49,7 +49,7 @@ else
fi

# FAIL2
$DIRACSCRIPTS/dirac-jobexec jobDescription-FAIL-multiSteps.xml $DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/pilot.cfg $DEBUG
$DIRACSCRIPTS/dirac-jobexec jobDescription-FAIL-multiSteps.xml --cfg $DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/pilot.cfg $DEBUG
if [[ "${?}" -eq 111 ]]; then
echo -e "\nSuccess\n\n"
else
Expand All @@ -59,7 +59,7 @@ fi


# FAIL with exit code > 255
$DIRACSCRIPTS/dirac-jobexec jobDescription-FAIL1502.xml $DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/pilot.cfg $DEBUG
$DIRACSCRIPTS/dirac-jobexec jobDescription-FAIL1502.xml --cfg $DIRAC/DIRAC/tests/Integration/WorkloadManagementSystem/pilot.cfg $DEBUG
if [[ "${?}" -eq 222 ]]; then # This is 1502 & 255 (0xDE)
echo -e "\nSuccess\n\n"
else
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/all_integration_client_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pytest "${CLIENTINSTALLDIR}/DIRAC/tests/Integration/ResourceStatusSystem/Test_Pu
#-------------------------------------------------------------------------------#
echo -e "*** $(date -u) **** WMS TESTS ****\n"
# pytest "${CLIENTINSTALLDIR}"/DIRAC/tests/Integration/WorkloadManagementSystem/Test_PilotsLoggingClient.py |& tee -a clientTestOutputs.txt
python "${CLIENTINSTALLDIR}/DIRAC/tests/Integration/WorkloadManagementSystem/Test_SandboxStoreClient.py" "$WORKSPACE/TestCode/DIRAC/tests/Integration/WorkloadManagementSystem/sb.cfg" |& tee -a clientTestOutputs.txt; (( ERR |= "${?}" ))
python "${CLIENTINSTALLDIR}/DIRAC/tests/Integration/WorkloadManagementSystem/Test_SandboxStoreClient.py" --cfg "$WORKSPACE/TestCode/DIRAC/tests/Integration/WorkloadManagementSystem/sb.cfg" |& tee -a clientTestOutputs.txt; (( ERR |= "${?}" ))
pytest "${CLIENTINSTALLDIR}/DIRAC/tests/Integration/WorkloadManagementSystem/Test_JobWrapper.py" |& tee -a clientTestOutputs.txt; (( ERR |= "${?}" ))
pytest "${CLIENTINSTALLDIR}/DIRAC/tests/Integration/WorkloadManagementSystem/Test_PilotsClient.py" |& tee -a clientTestOutputs.txt; (( ERR |= "${?}" ))

Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/all_integration_server_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pytest "${SERVERINSTALLDIR}/DIRAC/tests/Integration/WorkloadManagementSystem/Tes
pytest "${SERVERINSTALLDIR}/DIRAC/tests/Integration/WorkloadManagementSystem/Test_TaskQueueDB.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
pytest "${SERVERINSTALLDIR}/DIRAC/tests/Integration/WorkloadManagementSystem/Test_ElasticJobDB.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
pytest "${SERVERINSTALLDIR}/DIRAC/tests/Integration/WorkloadManagementSystem/Test_JobParameters_MySQLandES.py" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
python "${SERVERINSTALLDIR}/DIRAC/tests/Integration/WorkloadManagementSystem/Test_Client_WMS.py" "${WORKSPACE}/TestCode/DIRAC/tests/Integration/WorkloadManagementSystem/sb.cfg" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))
python "${SERVERINSTALLDIR}/DIRAC/tests/Integration/WorkloadManagementSystem/Test_Client_WMS.py" --cfg "${WORKSPACE}/TestCode/DIRAC/tests/Integration/WorkloadManagementSystem/sb.cfg" |& tee -a "${SERVER_TEST_OUTPUT}"; (( ERR |= "${?}" ))

#-------------------------------------------------------------------------------#
echo -e "*** $(date -u) **** DMS TESTS ****\n"
Expand Down
2 changes: 1 addition & 1 deletion tests/Jenkins/dirac_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ installSite() {

echo "==> Done installing, now configuring"
source "${SERVERINSTALLDIR}/bashrc"
if ! dirac-configure "${SERVERINSTALLDIR}/install.cfg" "${DEBUG}"; then
if ! dirac-configure --cfg "${SERVERINSTALLDIR}/install.cfg" "${DEBUG}"; then
echo "ERROR: dirac-configure failed" >&2
exit 1
fi
Expand Down
10 changes: 5 additions & 5 deletions tests/Jenkins/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ getUserProxy() {
echo '==> Started getUserProxy'

cp "${TESTCODE}/DIRAC/tests/Jenkins/dirac-cfg-update.py" "."
if ! python dirac-cfg-update.py -S "${DIRACSETUP}" "${CLIENTINSTALLDIR}/etc/dirac.cfg" -F "${CLIENTINSTALLDIR}/etc/dirac.cfg" -o /DIRAC/Security/UseServerCertificate=True -o /DIRAC/Security/CertFile=/home/dirac/certs/hostcert.pem -o /DIRAC/Security/KeyFile=/home/dirac/certs/hostkey.pem "${DEBUG}"; then
if ! python dirac-cfg-update.py -S "${DIRACSETUP}" --cfg "${CLIENTINSTALLDIR}/etc/dirac.cfg" -F "${CLIENTINSTALLDIR}/etc/dirac.cfg" -o /DIRAC/Security/UseServerCertificate=True -o /DIRAC/Security/CertFile=/home/dirac/certs/hostcert.pem -o /DIRAC/Security/KeyFile=/home/dirac/certs/hostkey.pem "${DEBUG}"; then
echo 'ERROR: dirac-cfg-update failed' >&2
exit 1
fi
Expand Down Expand Up @@ -1025,15 +1025,15 @@ downloadProxy() {

if [[ "${PILOTCFG}" ]]; then
if [[ -e "${CLIENTINSTALLDIR}/etc/dirac.cfg" ]]; then # called from the client directory
python dirac-proxy-download.py "${DIRACUSERDN}" -R "${DIRACUSERROLE}" -o /DIRAC/Security/UseServerCertificate=True "${CLIENTINSTALLDIR}/etc/dirac.cfg" "${PILOTINSTALLDIR}/$PILOTCFG" "${DEBUG}"
python dirac-proxy-download.py "${DIRACUSERDN}" -R "${DIRACUSERROLE}" -o /DIRAC/Security/UseServerCertificate=True --cfg "${CLIENTINSTALLDIR}/etc/dirac.cfg" "${PILOTINSTALLDIR}/$PILOTCFG" "${DEBUG}"
else # assuming it's the pilot
python dirac-proxy-download.py "${DIRACUSERDN}" -R "${DIRACUSERROLE}" -o /DIRAC/Security/UseServerCertificate=True "${PILOTINSTALLDIR}/$PILOTCFG" "${DEBUG}"
python dirac-proxy-download.py "${DIRACUSERDN}" -R "${DIRACUSERROLE}" -o /DIRAC/Security/UseServerCertificate=True --cfg "${PILOTINSTALLDIR}/$PILOTCFG" "${DEBUG}"
fi
else
if [[ -e "${CLIENTINSTALLDIR}/etc/dirac.cfg" ]]; then # called from the client directory
python dirac-proxy-download.py "${DIRACUSERDN}" -R "${DIRACUSERROLE}" -o /DIRAC/Security/UseServerCertificate=True "${CLIENTINSTALLDIR}/etc/dirac.cfg" "${DEBUG}"
python dirac-proxy-download.py "${DIRACUSERDN}" -R "${DIRACUSERROLE}" -o /DIRAC/Security/UseServerCertificate=True --cfg "${CLIENTINSTALLDIR}/etc/dirac.cfg" "${DEBUG}"
else # assuming it's the pilot
python dirac-proxy-download.py "${DIRACUSERDN}" -R "${DIRACUSERROLE}" -o /DIRAC/Security/UseServerCertificate=True "${PILOTINSTALLDIR}/etc/dirac.cfg" "${DEBUG}"
python dirac-proxy-download.py "${DIRACUSERDN}" -R "${DIRACUSERROLE}" -o /DIRAC/Security/UseServerCertificate=True --cfg "${PILOTINSTALLDIR}/etc/dirac.cfg" "${DEBUG}"
fi
fi

Expand Down