Return-Path: X-Original-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BCF8BC986 for ; Wed, 13 Mar 2013 20:21:37 +0000 (UTC) Received: (qmail 88485 invoked by uid 500); 13 Mar 2013 20:21:35 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 88418 invoked by uid 500); 13 Mar 2013 20:21:34 -0000 Mailing-List: contact cloudstack-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-commits@incubator.apache.org Received: (qmail 88110 invoked by uid 99); 13 Mar 2013 20:21:34 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Mar 2013 20:21:34 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 4A85316071; Wed, 13 Mar 2013 20:21:34 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bfederle@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [27/34] git commit: refs/heads/ui-ntier2 - CLOUDSTACK-1653: Redundant router: Fix check_heartbeat.sh malfunctional due to delayed cron job Message-Id: <20130313202134.4A85316071@tyr.zones.apache.org> Date: Wed, 13 Mar 2013 20:21:34 +0000 (UTC) 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. Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/630e7559 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/630e7559 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/630e7559 Branch: refs/heads/ui-ntier2 Commit: 630e75596ed6a4cf769b24900d383a05ebb25cdc Parents: bf15eb0 Author: Sheng Yang Authored: Tue Mar 12 18:24:31 2013 -0700 Committer: Sheng Yang Committed: Tue Mar 12 18:31:31 2013 -0700 ---------------------------------------------------------------------- .../root/redundant_router/check_heartbeat.sh.templ | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/630e7559/patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ ---------------------------------------------------------------------- diff --git a/patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ b/patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ index 908c0d8..7a980bd 100755 --- a/patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ +++ b/patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ @@ -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