Skip to content

Commit 5ccebf0

Browse files
committed
Merge pull request #1514 from dsclose/CLOUDSTACK-6975
CLOUDSTACK-6975: Prevent dnsmasq from starting on backup redundant RvRRebase of PR #1509 against the 4.7 branch as requested by @swill One LGTM from @ustcweizhou carried from previous PR. Previous PR will be closed. Description from PR #1509: CLOUDSTACK-6975 refers to service monitoring bringing up dnsmasq but this is no-longer accurate, as service monitoring is not active on the post-4.6 routers. These routers still suffer an essentially identical issue, however, because "dnsmasq needs to be restarted each time configure.py is called in order to avoid lease problems." As such, dnsmasq is still running on backup RvRs, causing the issues described in CLOUDSTACK-6975. This PR is based on a patch submitted by @ustcweizhou. The code now checks the redundant state of the router before restarting dnsmasq. RvR networks without this patch have dnsmasq running on both master and backup routers. RvR networks with this patch have dnsmasq running on only the master router. * pr/1514: CLOUDSTACK-6975: Prevent dnsmasq from starting on backup redundant RvR. Signed-off-by: Will Stevens <[email protected]>
2 parents 82f1198 + 38b3bdd commit 5ccebf0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • systemvm/patches/debian/config/opt/cloud/bin/cs

systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ def process(self):
5454
self.cloud.commit()
5555

5656
# We restart DNSMASQ every time the configure.py is called in order to avoid lease problems.
57-
CsHelper.service("dnsmasq", "restart")
57+
if not self.cl.is_redundant() or self.cl.is_master():
58+
CsHelper.service("dnsmasq", "restart")
5859

5960
def configure_server(self):
6061
# self.conf.addeq("dhcp-hostsfile=%s" % DHCP_HOSTS)

0 commit comments

Comments
 (0)