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.

Change-Id: Icfbe6177d4c913c3d7755ca40a71752bcdaa4448
  • Loading branch information
russellb committed Jun 14, 2012
1 parent 2adeb5a commit aa1e71d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nova/network/linux_net.py
Expand Up @@ -704,6 +704,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

1 comment on commit aa1e71d

@syshack
Copy link

@syshack syshack commented on aa1e71d Jan 4, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job~

Please sign in to comment.