diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 3852ef16..48b87dc1 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -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