Skip to content

Commit

Permalink
If POOL is a hostname or host:port then use it as a central manager a…
Browse files Browse the repository at this point in the history
…s opposed to bailing out

We don't specify a separate CCB_ADDRESS in that case; also we disable remote syslog.
Also toss in a special case that if POOL is "ospool" then we choose prod-ospool or itb-ospool
depending on $ITB.  I like this better than having that behavior be implicit if POOL is blank.

(SOFTWARE-5383)
  • Loading branch information
matyasselmeci committed Nov 22, 2023
1 parent 7b9894d commit 2349a63
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
24 changes: 20 additions & 4 deletions 10-setup-htcondor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,17 @@ fi

# Default to the production OSPool unless $ITB is set
if is_true "$ITB"; then
POOL=${POOL:=itb-ospool}
if [[ $POOL == ospool ]]; then
POOL=itb-ospool
fi
glidein_group=itb
glidein_group_dir=client_group_itb
script_exec_prefix=/usr/sbin/itb-
script_lib_prefix=/gwms/client_group_itb/itb-
else
POOL=${POOL:=prod-ospool}
if [[ $POOL == ospool ]]; then
POOL=prod-ospool
fi
glidein_group=main
glidein_group_dir=client_group_main
script_exec_prefix=/usr/sbin/
Expand Down Expand Up @@ -206,6 +210,15 @@ case ${POOL} in
default_syslog_host=syslog.osgdev.chtc.io
GLIDECLIENT_Group=path-container
;;
*.*)
ENABLE_REMOTE_SYSLOG=false
default_cm1=$POOL
default_cm2=
;;
'')
echo "POOL is blank" >&2
exit 1
;;
*)
echo "Unknown pool $POOL" >&2
exit 1
Expand Down Expand Up @@ -327,7 +340,10 @@ if [[ -n $CONDOR_HOST ]]; then
# so we unset it here to avoid confusion
POOL=
else
CONDOR_HOST=$default_cm1,$default_cm2
CONDOR_HOST=$default_cm1
if [[ $default_cm2 ]]; then
CONDOR_HOST=${CONDOR_HOST},${default_cm2}
fi
fi

# default COLLECTOR_HOST
Expand Down Expand Up @@ -420,7 +436,7 @@ EXECUTE = $LOCAL_DIR/execute
SEC_TOKEN_DIRECTORY = $LOCAL_DIR/condor/tokens.d
COLLECTOR_HOST = $COLLECTOR_HOST
CCB_ADDRESS = $CCB_ADDRESS
${CCB_ADDRESS:+"CCB_ADDRESS = $CCB_ADDRESS"}
# Let the OS pick a random shared port port so we don't collide with anything else
SHARED_PORT_PORT = 0
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,7 @@ ENV ENABLE_REMOTE_SYSLOG=true
# Use ITB versions of scripts and connect to the ITB pool
ENV ITB=false

# The pool to join; this can be 'itb-ospool', 'prod-ospool', 'prod-path-facility',
# 'dev-path-facility', or the hostname or host:port of a central manager.
# If it's set to 'ospool', then it will use 'itb-ospool' or 'prod-ospool' depending on $ITB.
ENV POOL=ospool

0 comments on commit 2349a63

Please sign in to comment.