jayakarteek commented on a change in pull request #587: CLOUDSTACK-8616: 
Redundant VPC with both routers as Master
URL: https://github.com/apache/cloudstack/pull/587#discussion_r168075787
 
 

 ##########
 File path: 
systemvm/patches/debian/config/opt/cloud/templates/check_heartbeat.sh.templ
 ##########
 @@ -22,11 +22,11 @@ STRIKE_FILE="$ROUTER_BIN_PATH/keepalived.strikes"
 
 if [ -e $ROUTER_BIN_PATH/keepalived.ts2 ]
 then
-    lasttime=$(cat $ROUTER_BIN_PATH/keepalived.ts2)
     thistime=$(cat $ROUTER_BIN_PATH/keepalived.ts)
-    diff=$(($thistime - $lasttime))
+    lasttime=$(cat $ROUTER_BIN_PATH/keepalived.ts2)
+    diff=$(($lasttime - $thistime))
     s=0
-    if [ $diff -lt 30 ]
 
 Review comment:
   @wilderrodrigues  why there is a change in time comparison logic.
   if condition will never be true with the changes last-time will be less then 
this-time and diff will be negative.
   So this will end up filling the logs in else condition

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to