You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ek...@apache.org on 2015/07/16 13:16:05 UTC
[4/6] git commit: updated refs/heads/master to b29d8e7
CLOUDSTACK-8616 - Add keepalived start on reboot
- Runs check_heartbeat.sh every 30 seconds
CLOUDSTACK-861 - Copy/Paste error
- Paste the wrong command in the crontab line.
Signed-off-by: wilderrodrigues <wr...@schubergphilis.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/12ee36a5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/12ee36a5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/12ee36a5
Branch: refs/heads/master
Commit: 12ee36a55f96251c4ac02133081d7c6272a8ad35
Parents: 20be22c
Author: wilderrodrigues <wr...@schubergphilis.com>
Authored: Thu Jul 9 11:40:32 2015 +0200
Committer: wilderrodrigues <wr...@schubergphilis.com>
Committed: Thu Jul 16 13:14:48 2015 +0200
----------------------------------------------------------------------
.../config/opt/cloud/bin/cs/CsRedundant.py | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/12ee36a5/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py
index 9003555..f2ab09c 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py
+++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py
@@ -137,12 +137,20 @@ class CsRedundant(object):
if file.is_changed():
CsHelper.service("keepalived", "reload")
- # Configure heartbeat cron job
- cron = CsFile("/etc/cron.d/heartbeat")
- cron.add("SHELL=/bin/bash", 0)
- cron.add("PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin", 1)
- cron.add("*/1 * * * * root $SHELL %s/check_heartbeat.sh 2>&1 > /dev/null" % self.CS_ROUTER_DIR, -1)
- cron.commit()
+ # Configure heartbeat cron job - runs every 30 seconds
+ heartbeat_cron = CsFile("/etc/cron.d/heartbeat")
+ heartbeat_cron.add("SHELL=/bin/bash", 0)
+ heartbeat_cron.add("PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin", 1)
+ heartbeat_cron.add("* * * * * root $SHELL %s/check_heartbeat.sh 2>&1 > /dev/null" % self.CS_ROUTER_DIR, -1)
+ heartbeat_cron.add("* * * * * root sleep 30; $SHELL %s/check_heartbeat.sh 2>&1 > /dev/null" % self.CS_ROUTER_DIR, -1)
+ heartbeat_cron.commit()
+
+ # Configure KeepaliveD cron job - runs at every reboot
+ keepalived_cron = CsFile("/etc/cron.d/keepalived")
+ keepalived_cron.add("SHELL=/bin/bash", 0)
+ keepalived_cron.add("PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin", 1)
+ keepalived_cron.add("@reboot root service keepalived start", -1)
+ keepalived_cron.commit()
proc = CsProcess(['/usr/sbin/keepalived', '--vrrp'])
if not proc.find():