mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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.
This commit is contained in:
parent
bf15eb0c7f
commit
630e75596e
@ -22,7 +22,7 @@ then
|
||||
lasttime=$(cat [RROUTER_BIN_PATH]/keepalived.ts2)
|
||||
thistime=$(cat [RROUTER_BIN_PATH]/keepalived.ts)
|
||||
diff=$(($thistime - $lasttime))
|
||||
if [ $diff -gt 100 ]
|
||||
if [ $diff -lt 30]
|
||||
then
|
||||
echo Keepalived process is dead! >> [RROUTER_LOG]
|
||||
service keepalived stop >> [RROUTER_LOG] 2>&1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user