Skip to content

Commit

Permalink
Ensure dnsmasq accept rules are preset at startup.
Browse files Browse the repository at this point in the history
Fix bug 1000853.

This bug reported that after restarting nova-network, the dnsmasq ACCEPT
iptables rules were no longer present, causing instances to lose their
IP addresses.  This patch updates the restart_dhcp() function in the
linux_net driver to ensure these rules are present even if dnsmasq was
already running.  Before this was only done when first starting dnsmasq.

(cherry picked from commit aa1e71d)

Change-Id: Icda3364d3a61018b912cea7a4c96b2cbcc1fbdd7
  • Loading branch information
russellb committed Jun 14, 2012
1 parent 0c2b4f6 commit bc621bc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nova/network/linux_net.py
Expand Up @@ -689,6 +689,7 @@ def restart_dhcp(context, dev, network_ref):
if conffile.split("/")[-1] in out:
try:
_execute('kill', '-HUP', pid, run_as_root=True)
_add_dnsmasq_accept_rules(dev)
return
except Exception as exc: # pylint: disable=W0703
LOG.error(_('Hupping dnsmasq threw %s'), exc)
Expand Down

0 comments on commit bc621bc

Please sign in to comment.