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