Skip to content

Commit 630e755

Browse files
author
Sheng Yang
committed
CLOUDSTACK-1653: Redundant router: Fix check_heartbeat.sh malfunctional due to delayed cron job
The interval between keepalived.ts and keepalived.ts2 should be >= 60 seconds in normal condition, because every 10 seconds keepalived.ts would be updated, and at least every 60 seconds, keepalived.ts would be copy to keepalived.ts2. If the interval is less than 60 seconds, then keepalived process failed to update keepalived.ts every 10 seconds. Take some delay of updating into consideration, check_heartbeat.sh would use 30 seconds as a way to tell keepalived process is alive or not.
1 parent bf15eb0 commit 630e755

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ then
2222
lasttime=$(cat [RROUTER_BIN_PATH]/keepalived.ts2)
2323
thistime=$(cat [RROUTER_BIN_PATH]/keepalived.ts)
2424
diff=$(($thistime - $lasttime))
25-
if [ $diff -gt 100 ]
25+
if [ $diff -lt 30]
2626
then
2727
echo Keepalived process is dead! >> [RROUTER_LOG]
2828
service keepalived stop >> [RROUTER_LOG] 2>&1

0 commit comments

Comments
 (0)