@@ -252,15 +252,18 @@ add_W() # Add binarry to workflow command USAGE: add_W [BINARY] [COMMAND_LINE_OP
252
252
WORKFLOW+=$WFADD
253
253
}
254
254
255
- if [[ " ${GEN_TOPO_DEPLOYMENT_TYPE:- } " == " ALICE_STAGING" ]]; then
256
- GEN_TOPO_QC_CONSUL_SERVER=ali-staging.cern.ch
257
- else
258
- GEN_TOPO_QC_CONSUL_SERVER=alio2-cr1-hv-con01.cern.ch
255
+ if [[ ${EPNSYNCMODE:- 0} == 1 && " ${WORKFLOW_PARAMETERS:- } " =~ (^| ,)" QC" (,| $) ]]; then
256
+ if [[ " ${GEN_TOPO_DEPLOYMENT_TYPE:- } " == " ALICE_STAGING" ]]; then
257
+ GEN_TOPO_QC_CONSUL_SERVER=ali-staging.cern.ch
258
+ else
259
+ GEN_TOPO_QC_CONSUL_SERVER=alio2-cr1-hv-con01.cern.ch
260
+ fi
261
+ GEN_TOPO_QC_APRICOT_SERVER=` curl -s " http://${GEN_TOPO_QC_CONSUL_SERVER} :8500/v1/kv/o2/runtime/aliecs/vars/apricot_endpoint?raw" `
259
262
fi
260
- GEN_TOPO_QC_APRICOT_SERVER=` curl -s " http://${GEN_TOPO_QC_CONSUL_SERVER} :8500/v1/kv/o2/runtime/aliecs/vars/apricot_endpoint?raw" `
261
263
262
264
add_QC_from_consul ()
263
265
{
266
+ [[ ${EPNSYNCMODE:- 0} == 1 ]] || { echo " Error fetching QC JSON $1 : consul server only set for EPNSYNCMODE == 1 " 1>&2 && exit 1; }
264
267
if [[ ! -z ${GEN_TOPO_QC_JSON_FILE:- } ]]; then
265
268
curl -s -o $GEN_TOPO_QC_JSON_FILE " http://${GEN_TOPO_QC_CONSUL_SERVER} :8500/v1/kv${1} ?raw"
266
269
if [[ $? != 0 ]]; then
@@ -276,12 +279,13 @@ add_QC_from_consul()
276
279
277
280
add_QC_from_apricot ()
278
281
{
282
+ [[ ${EPNSYNCMODE:- 0} == 1 ]] || { echo " Error fetching QC JSON $1 : apricot server only set for EPNSYNCMODE == 1 " 1>&2 && exit 1; }
279
283
if [[ ! -z ${GEN_TOPO_QC_JSON_FILE:- } ]]; then
280
- if [[ ${1} =~ " ?" ]]; then
281
- curl -s -o $GEN_TOPO_QC_JSON_FILE " ${GEN_TOPO_QC_APRICOT_SERVER} /${1} \&process=true"
282
- else
283
- curl -s -o $GEN_TOPO_QC_JSON_FILE " ${GEN_TOPO_QC_APRICOT_SERVER} /${1} ?process=true"
284
- fi
284
+ if [[ ${1} =~ " ?" ]]; then
285
+ curl -s -o $GEN_TOPO_QC_JSON_FILE " ${GEN_TOPO_QC_APRICOT_SERVER} /${1} \&process=true"
286
+ else
287
+ curl -s -o $GEN_TOPO_QC_JSON_FILE " ${GEN_TOPO_QC_APRICOT_SERVER} /${1} ?process=true"
288
+ fi
285
289
if [[ $? != 0 ]]; then
286
290
echo " Error fetching QC JSON $1 "
287
291
exit 1
0 commit comments