cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] jayakarteek commented on a change in pull request #587: CLOUDSTACK-8616: Redundant VPC with both routers as Master
Date Thu, 01 Jan 1970 00:00:00 GMT
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message