Skip to content

Commit

Permalink
Fix for monitor verbose readiness logging and back out additional sta…
Browse files Browse the repository at this point in the history
…rtup logging to file (#33)
  • Loading branch information
bczoma authored Aug 4, 2023
1 parent 911e98e commit c26e64b
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pubsubplus/templates/solaceConfigMap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ data:
startup-broker.sh: |-
#!/bin/bash
APP=`basename "$0"`
LOG_FILE=/usr/sw/var/k8s_startup-broker.log # STDOUT/STDERR goes to k8s logs but will nor survive pod. This will also persist it.
if [ -f ${LOG_FILE} ] ; then
tail -n 1000 ${LOG_FILE} > ${LOG_FILE}.tmp; mv -f ${LOG_FILE}.tmp ${LOG_FILE} || : # Limit logs size
fi
exec > >(tee -a ${LOG_FILE}) 2>&1 # Setup logging
IFS='-' read -ra host_array <<< $(hostname)
node_ordinal=${host_array[-1]}
echo "`date` INFO: ${APP}-Node ordinal: ${node_ordinal}"
Expand Down Expand Up @@ -387,13 +382,12 @@ data:
# For monitor node just check for redundancy; active label will never be set
if [ "${node_ordinal}" = "2" ]; then
# Check redundancy
echo "`date` INFO: ${APP}-Running checks. Redundancy state check started..."
results=`/mnt/disks/solace/semp_query.sh -n admin -p ${password} -u http://localhost:8080 \
-q "<rpc><show><redundancy/></show></rpc>" \
-v "/rpc-reply/rpc/show/redundancy/redundancy-status"`
redundancystatus_results=`echo ${results} | xmllint -xpath "string(returnInfo/valueSearchResult)" -`
if [ "${redundancystatus_results}" != "Up" ]; then
echo "`date` INFO: ${APP}-Redundancy state is not yet up."
echo "`date` INFO: ${APP}-Waiting for redundancy up, redundancy state is not yet up."
rm -f ${FINAL_ACTIVITY_LOGGED_TRACKING_FILE}; exit 1
fi
if [ ! -f ${FINAL_ACTIVITY_LOGGED_TRACKING_FILE} ]; then
Expand Down

0 comments on commit c26e64b

Please sign in to comment.