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 32B1D10697 for ; Tue, 17 Mar 2015 10:26:18 +0000 (UTC) Received: (qmail 91668 invoked by uid 500); 17 Mar 2015 10:26:04 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 91613 invoked by uid 500); 17 Mar 2015 10:26:04 -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 89974 invoked by uid 99); 17 Mar 2015 10:26:04 -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; Tue, 17 Mar 2015 10:26:03 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 99405E1849; Tue, 17 Mar 2015 10:26:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bhaisaab@apache.org To: commits@cloudstack.apache.org Date: Tue, 17 Mar 2015 10:26:40 -0000 Message-Id: In-Reply-To: <0905c11225aa4ceab16836e7eb0bed4c@git.apache.org> References: <0905c11225aa4ceab16836e7eb0bed4c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [38/50] git commit: updated refs/heads/master to 3c429ee dnsmasq should restart if config changes and hup if hosts change Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7700e940 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7700e940 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7700e940 Branch: refs/heads/master Commit: 7700e940fff587d8dd7f0994171ae7b7e23d149c Parents: 962a62e Author: Ian Southam Authored: Tue Feb 17 14:13:43 2015 +0100 Committer: wilderrodrigues Committed: Mon Mar 16 11:40:07 2015 +0100 ---------------------------------------------------------------------- .../patches/debian/config/opt/cloud/bin/cs/CsDatabag.py | 2 +- systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py | 9 ++++----- .../patches/debian/config/opt/cloud/bin/cs/CsRedundant.py | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7700e940/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDatabag.py ---------------------------------------------------------------------- diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDatabag.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDatabag.py index b2e559d..a3818e5 100644 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDatabag.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDatabag.py @@ -132,7 +132,7 @@ class CsCmdLine(CsDataBag): def get_router_password(self): if "router_password" in self.idata(): return self.idata()['router_password'] - + ''' Generate a password based on the router id just to avoid hard-coded passwd. Remark: if for some reason 1 router gets configured, the other one will have a different password. http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7700e940/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py ---------------------------------------------------------------------- diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py index 0a1c8e2..1b76b86 100644 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py @@ -47,11 +47,10 @@ class CsDhcp(CsDataBag): self.configure_server() self.conf.commit() self.cloud.commit() - if self.cloud.is_changed(): - if length < 2: - CsHelper.service("dnsmasq", "restart") - else: - CsHelper.hup_dnsmasq("dnsmasq", "dnsmasq") + if self.conf.is_changed(): + CsHelper.service("dnsmasq", "restart") + elif self.cloud.is_changed(): + CsHelper.hup_dnsmasq("dnsmasq", "dnsmasq") def configure_server(self): # self.conf.addeq("dhcp-hostsfile=%s" % DHCP_HOSTS) http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7700e940/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 a947fd1..7ada710 100644 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py @@ -122,7 +122,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) - file.section("authentication {", "}", [ " auth_type AH \n", " auth_pass %s\n" % self.cl.get_router_password()] ) + file.section("authentication {", "}", [" auth_type AH \n", " auth_pass %s\n" % self.cl.get_router_password()]) file.section("virtual_ipaddress {", "}", self._collect_ips()) file.commit()