cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [26/50] [abbrv] git commit: updated refs/heads/feature/systemvm-persistent-config to 8620642
Date Mon, 16 Feb 2015 16:48:07 GMT
Restart keepalived if a pub interface gets added or removed


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

Branch: refs/heads/feature/systemvm-persistent-config
Commit: 4a1a6f7f744ba8c858046e47c8fa08547d0a896d
Parents: 75d06e9
Author: Ian Southam <isoutham@schubergphilis.com>
Authored: Thu Jan 29 15:50:36 2015 +0100
Committer: wilderrodrigues <wrodrigues@schubergphilis.com>
Committed: Mon Feb 16 16:08:41 2015 +0100

----------------------------------------------------------------------
 .../debian/config/opt/cloud/bin/cs/CsRedundant.py        | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a1a6f7f/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 2fa4160..aed19d1 100644
--- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py
+++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py
@@ -98,6 +98,13 @@ class CsRedundant(object):
 
         # keepalived configuration
         file = CsFile(self.KEEPALIVED_CONF)
+        ads = [o for o in self.address.get_ips() if o.is_public()]
+        # Add a comment for each public IP.  If any change this will cause keepalived to
restart
+        # As things stand keepalived will be configured before the IP is added or deleted
+        i = 0
+        for o in ads:
+            file.addeq("! %s=%s" % (i, o.get_cidr()))
+            i = i + 1
         file.search(" router_id ", "    router_id %s" % self.cl.get_name())
         file.search(" priority ", "    priority %s" % self.cl.get_priority())
         file.search(" weight ", "    weight %s" % 2)
@@ -105,11 +112,7 @@ class CsRedundant(object):
         file.search(" state ", "    state %s" % "EQUAL")
         # file.search(" virtual_router_id ", "    virtual_router_id %s" % self.cl.get_router_id())
         file.greplace("[RROUTER_BIN_PATH]", self.CS_ROUTER_DIR)
-# If there is no guest network still bring up the public interface
-# Maybe necessary for things like VPNs and private gateways
         file.section("virtual_ipaddress {", "}", self._collect_ips())
-        # if self.cl.get_state() == 'MASTER':
-            # file.search(" priority ", "    priority %s" % 100)
         file.commit()
 
         # conntrackd configuration


Mime
View raw message