]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Schedule net to a DHCP agt on subnet create
authorKevin Benton <blak111@gmail.com>
Thu, 12 Mar 2015 01:32:52 +0000 (18:32 -0700)
committerKevin Benton <kevinbenton@buttewifi.com>
Tue, 17 Mar 2015 04:22:34 +0000 (04:22 +0000)
commit05f234481474aa05f59c4af459b4343d21397afc
treed2899b51915f261e1acc7f117c516ce49c5efb14
parent5c6781a6f76a470ca67be7970981ebc46c62c70a
Schedule net to a DHCP agt on subnet create

Change the DHCP notifier behavior to schedule a network
to a DHCP agent when a subnet is created rather than
waiting for the first port to be created.

This will reduce the possibility to get a VM port created
and have it send a DHCP request before the DHCP agent is
ready. Before, the network would be scheduled to an agent
as a result of the API call to create the VM port, so the
DHCP port wouldn't be created until after the VM port.
After this patch, the network will have been scheduled to
a DHCP agent before the first VM port is created.

There is still a possibility that the DHCP agent could be
responding so slowly that it doesn't create its port and
activate the dnsmasq instance before the VM sends traffic.
A proper fix will ensure that the dnsmasq instance is
truly ready to serve requests for a new port will require
significantly more code for barriers (either on the subnet
creation, port creation, or the nova boot process) are too
complex to add this late in the cycle.

This patch also eliminates the logic in the n1kv plugin that
was already doing the same thing.

Closes-Bug: #1431105
Change-Id: I1c1caed0fdda6b801375a07f9252a9127058a07e
neutron/api/rpc/agentnotifiers/dhcp_rpc_agent_api.py
neutron/plugins/cisco/n1kv/n1kv_neutron_plugin.py
neutron/tests/unit/api/rpc/agentnotifiers/test_dhcp_rpc_agent_api.py
neutron/tests/unit/openvswitch/test_agent_scheduler.py