]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Only resync DHCP for a particular network when their is a failure
authorTerry Wilson <twilson@redhat.com>
Thu, 16 Oct 2014 01:56:17 +0000 (20:56 -0500)
committerTerry Wilson <twilson@redhat.com>
Wed, 22 Oct 2014 19:23:03 +0000 (19:23 +0000)
commitbb7cce32f3ca5ccf903e13d37c2c62a0222090da
treed6a79fdec71f8b646b7a3dfbc2b26338c46522b0
parentd217543ea05f7be2b01630afa76148bf1c0b48bb
Only resync DHCP for a particular network when their is a failure

The previous implementation will loop through and restart the dhcp
process for all active networks any time there is an exception calling
a dhcp driver function. This allows a tenant who can create an exception
to cause every dhcp process to restart. On systems with lots of networks
this can easily take longer than the default resync timeout leading to a
system that becomes unresponsive because of the load continually restarting
causes.

This patch restarts only dhcp processes related to the network on which
operations are failing. It should be noted that if there was some kind
of missed notification for a subnet update, the previous implementation
may have incidentally fixed it by restarting everything on the off
chance that something else caused an exception, but obviously relying
on that would be a bad idea as exceptions should be, well, exceptional.

Closes-bug: #1384402

Change-Id: I0b348a1657a7eb3a595f9bf6b217716a37ce38c6
neutron/agent/dhcp_agent.py
neutron/tests/unit/test_dhcp_agent.py