cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [03/20] git commit: updated refs/heads/4.3 to 67df5b9
Date Tue, 25 Nov 2014 19:04:59 GMT
CLOUDSTACK-6989: Add 3 strikes rule for RvR freezing detection

Sometime in VR ntpd would move time backward to keep sync with NTP server, which
can result in false alarm of keepalived monitering process.

This patch adds 3 strikes for keepalived process dead detection to avoid falsely
shutdown keepalived process due to time adjustment for only once.

(cherry picked from commit 75c9a20c7773c268c02fb006d1a7820cb427c94c)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7f1dd864
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7f1dd864
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7f1dd864

Branch: refs/heads/4.3
Commit: 7f1dd86443d7ef55f4ce82b4174c17e00c545df9
Parents: 96e14f3
Author: Sheng Yang <sheng.yang@citrix.com>
Authored: Tue Jun 24 16:58:55 2014 -0700
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Tue Nov 25 22:42:55 2014 +0530

----------------------------------------------------------------------
 .../root/redundant_router/check_heartbeat.sh.templ   | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7f1dd864/systemvm/patches/debian/config/root/redundant_router/check_heartbeat.sh.templ
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/root/redundant_router/check_heartbeat.sh.templ
b/systemvm/patches/debian/config/root/redundant_router/check_heartbeat.sh.templ
index 95cabd6b..d6bdc5d 100755
--- a/systemvm/patches/debian/config/root/redundant_router/check_heartbeat.sh.templ
+++ b/systemvm/patches/debian/config/root/redundant_router/check_heartbeat.sh.templ
@@ -17,13 +17,28 @@
 # under the License.
 
 
+STRIKE_FILE="[RROUTER_BIN_PATH]/keepalived.strikes"
+
 if [ -e [RROUTER_BIN_PATH]/keepalived.ts2 ]
 then
     lasttime=$(cat [RROUTER_BIN_PATH]/keepalived.ts2)
     thistime=$(cat [RROUTER_BIN_PATH]/keepalived.ts)
     diff=$(($thistime - $lasttime))
+    s=0
     if [ $diff -lt 30 ]
     then
+        if [ -e $STRIKE_FILE ]
+        then
+            s=`cat $STRIKE_FILE 2>/dev/null`
+        fi
+        s=$(($s+1))
+        echo $s > $STRIKE_FILE
+    else
+        rm $STRIKE_FILE
+    fi
+    #3 strikes rule
+    if [ $s -gt 2 ]
+    then
         echo Keepalived process is dead! >> [RROUTER_LOG]
         [RROUTER_BIN_PATH]/services.sh stop >> [RROUTER_LOG] 2>&1
         [RROUTER_BIN_PATH]/disable_pubip.sh >> [RROUTER_LOG] 2>&1


Mime
View raw message