Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 30F7210745 for ; Mon, 16 Feb 2015 16:48:07 +0000 (UTC) Received: (qmail 51417 invoked by uid 500); 16 Feb 2015 16:47:44 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 51340 invoked by uid 500); 16 Feb 2015 16:47:44 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 50230 invoked by uid 99); 16 Feb 2015 16:47:43 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Feb 2015 16:47:43 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 19481E03E9; Mon, 16 Feb 2015 16:47:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dahn@apache.org To: commits@cloudstack.apache.org Date: Mon, 16 Feb 2015 16:47:57 -0000 Message-Id: <8433fd7e96ec4255ace20da83eaca63c@git.apache.org> In-Reply-To: <01c69cd6b912462c96d5f8bdd3339ac2@git.apache.org> References: <01c69cd6b912462c96d5f8bdd3339ac2@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [16/50] [abbrv] git commit: updated refs/heads/feature/systemvm-persistent-config to 8620642 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/c174d771 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c174d771 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c174d771 Branch: refs/heads/feature/systemvm-persistent-config Commit: c174d771a6ade58003bc264eee28016217684b54 Parents: f931111 Author: Ian Southam Authored: Tue Jan 27 16:58:16 2015 +0100 Committer: wilderrodrigues Committed: Mon Feb 16 16:08:38 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/c174d771/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/c174d771/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/c174d771/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")