Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-07 12:52:12 -06:00
parent 343fa07e9f
commit 11ed98ecaf

View File

@@ -183,6 +183,7 @@ STATUS-CHECK(){
done done
fi fi
#REPLICATION CHECK #REPLICATION CHECK
declare -i timeout
timeout=`date --date='30 seconds' +%s` timeout=`date --date='30 seconds' +%s`
nid=1 nid=1
for nip in "${NODE_HOSTS[@]}" for nip in "${NODE_HOSTS[@]}"
@@ -198,14 +199,14 @@ STATUS-CHECK(){
else else
checked="`ssh root@10.5.10.51 \"ssh root@${nip} \"cat ${REPL_CHECKS[${rcheck}]}/test.repl\" | diff - ${REPL_CHECKS[${rcheck}]}/test.repl\"`" checked="`ssh root@10.5.10.51 \"ssh root@${nip} \"cat ${REPL_CHECKS[${rcheck}]}/test.repl\" | diff - ${REPL_CHECKS[${rcheck}]}/test.repl\"`"
fi fi
if [ "`date +%s`" -gt "$timeout" ]; then if [ `date +%s` -gt $timeout ]; then
timeout=true timeout=true
break break
fi fi
done done
if [ "${timeout}" = "true" ]; then if [ "${timeout}" = "true" ]; then
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})." | 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}
else else
rm -f ${FOLDER}/${nip}-${rcheck}.down rm -f ${FOLDER}/${nip}-${rcheck}.down
fi fi