cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [34/50] [abbrv] git commit: updated refs/heads/feature/systemvm-persistent-config to 4fe7264
Date Wed, 04 Feb 2015 20:28:54 GMT
Vrrp will fail if your own code keeps killing it off


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

Branch: refs/heads/feature/systemvm-persistent-config
Commit: 87bdf5bbc96514781d8751d3c9fab1f601138679
Parents: 5303d2a
Author: Ian Southam <isoutham@schubergphilis.com>
Authored: Tue Jan 27 16:58:16 2015 +0100
Committer: wilderrodrigues <wrodrigues@schubergphilis.com>
Committed: Wed Feb 4 18:47:10 2015 +0100

----------------------------------------------------------------------
 .../patches/debian/config/opt/cloud/bin/configure.py     |  7 +++++--
 .../patches/debian/config/opt/cloud/bin/cs/CsAddress.py  | 11 +++++++++++
 .../debian/config/opt/cloud/bin/cs/CsRedundant.py        |  3 ++-
 3 files changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/87bdf5bb/systemvm/patches/debian/config/opt/cloud/bin/configure.py
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/configure.py b/systemvm/patches/debian/config/opt/cloud/bin/configure.py
index b04da82..b693477 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/configure.py
+++ b/systemvm/patches/debian/config/opt/cloud/bin/configure.py
@@ -556,8 +556,8 @@ def main(argv):
     fwd = CsForwardingRules("forwardingrules", config)
     fwd.process()
 
-    vpns = CsSite2SiteVpn("site2sitevpn", config)
-    vpns.process()
+    nf = CsNetfilters()
+    nf.compare(config.get_fw())
 
     red = CsRedundant(config)
     red.set()
@@ -565,6 +565,9 @@ def main(argv):
     nf = CsNetfilters()
     nf.compare(config.get_fw())
 
+    vpns = CsSite2SiteVpn("site2sitevpn", config)
+    vpns.process()
+
     dhcp = CsDhcp("dhcpentry", config)
     dhcp.process()
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/87bdf5bb/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py
index 9362df1..a3ca801 100644
--- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py
+++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py
@@ -491,9 +491,20 @@ class CsIP:
                     self.setAddress(address)
                     if self.hasIP(ip):
                         found = True
+                    if self.is_guest_gateway(address, ip):
+                        found = True
             if not found:
                 self.delete(ip)
 
+    def is_guest_gateway(self, bag, ip):
+        """ Exclude the vrrp maintained addresses on a redundant router """
+        if not self.config.cl.is_redundant():
+           return False
+        rip = ip.split('/')[0]
+        if bag['nw_type'] == "guest" and rip == bag['gateway']:
+           return True
+        return False
+
     def delete(self, ip):
         remove = []
         if ip == "all":

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/87bdf5bb/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 9569f08..4312462 100644
--- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py
+++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py
@@ -105,6 +105,8 @@ class CsRedundant(object):
         file.search(" virtual_router_id ", "    virtual_router_id %s" % self.cl.get_router_id())
         file.greplace("[RROUTER_BIN_PATH]", self.CS_ROUTER_DIR)
         file.section("virtual_ipaddress {", "}", self._collect_ips())
+        if self.cl.get_state() == 'MASTER':
+            file.search(" priority ", "    priority %s" % 120)
         file.commit()
 
         # conntrackd configuration
@@ -209,7 +211,6 @@ class CsRedundant(object):
         CsHelper.service("cloud-passwd-srvr", "restart")
         CsHelper.service("dnsmasq", "restart")
         self.cl.dbag['config']['redundant_master'] = "true"
-        self._set_priority(self.CS_PRIO_UP)
         self.cl.save()
         #CsHelper.service("keepalived", "restart")
         logging.info("Router switched to master mode")


Mime
View raw message