Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-07 13:26:41 -06:00
parent 8f32030883
commit 6830106bae

View File

@@ -130,6 +130,7 @@ STATUS() {
else else
echo -e "${idsCL[Red]}Timeout${idsCL[Default]}" echo -e "${idsCL[Red]}Timeout${idsCL[Default]}"
touch ${FOLDER}/${nip}-${rcheck}.down touch ${FOLDER}/${nip}-${rcheck}.down
#echo "Timeout occurred in waiting for replication between primary node and iDS-Node${nid} (${nip}) for the replicated folder of '${rcheck}'." | mail -s "Status-Check" ${STATUS_CHECK_EMAIL}
fi fi
done done
echo echo
@@ -193,15 +194,12 @@ STATUS-CHECK(){
done done
fi fi
#REPLICATION CHECK #REPLICATION CHECK
declare -i timeout
timeout=`date --date='10 seconds' +%s`
nid=1 nid=1
for nip in "${NODE_HOSTS[@]}" for nip in "${NODE_HOSTS[@]}"
do do
if [ "${nip}" = '10.5.10.51' ] && [ ! -z ${LOCAL_SERVICES+x} ]; then isreplhost=true; else isreplhost=false; fi if [ "${nip}" = '10.5.10.51' ] && [ ! -z ${LOCAL_SERVICES+x} ]; then isreplhost=true; else isreplhost=false; fi
if [[ $(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]] && [ "${isreplhost}" = "false" ]; then if [[ $(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]] && [ "${isreplhost}" = "false" ]; then
for rcheck in "${REPL_CHECK[@]}" for rcheck in "${REPL_CHECK[@]}"; do
do
checked=false checked=false
until [ "${checked}" = "" ]; do until [ "${checked}" = "" ]; do
if [ "${NCMD}" = "" ]; then if [ "${NCMD}" = "" ]; then
@@ -221,6 +219,7 @@ STATUS-CHECK(){
echo "Timeout occurred in waiting for replication between primary node and iDS-Node${nid} (${nip}) for the replicated folder of '${rcheck}'." | mail -s "Status-Check" ${STATUS_CHECK_EMAIL} echo "Timeout occurred in waiting for replication between primary node and iDS-Node${nid} (${nip}) for the replicated folder of '${rcheck}'." | mail -s "Status-Check" ${STATUS_CHECK_EMAIL}
fi fi
done done
echo
fi fi
nid=`expr $nid + 1` nid=`expr $nid + 1`
done done