neutron/neutron/tests/unit/api/rpc/handlers
Kailun Qin b70ee4df88 Block port update from unbound DHCP agent
Current DHCP port management in Neutron makes the server to clear the
device_id while the agent is responsible for setting it.

This may cause a potential race condition, for example during network
rescheduling. The server aims to clear the device_id on a DHCP port and
assign the network to another agent while the old agent might just be
taking possession of the port. If the DHCP agent takes possession of the
port (i.e., update port...set the device_id) before the server clears
it, then there is no issue. However, if this happens after the clear
operation by server then the DHCP port would be updated/marked to be
owned by the old agent.

When the new agent takes over the network scheduled to it, it won't be
able to find a port to reuse so that an extra port might need to be
created. This leads to two issues:
1) an extra port is created and never deleted;
2) the extra port creation may fail if there are no available IP
addresses.

This patch proposes a validation check to prevent an agent from updating
a DHCP port unless the network is bound to that agent.

Co-authored-by: Allain Legacy <Allain.legacy@windriver.com>

Closes-Bug: #1795126
Story: 2003919
Change-Id: Ie619516c07fb3dc9d025f64c0e1e59d5d808cb6f
2018-10-31 12:58:45 +00:00
..
__init__.py Fix AttributeError when using DVRServerRpcApi 2015-01-27 13:59:00 -08:00
test_dhcp_rpc.py Block port update from unbound DHCP agent 2018-10-31 12:58:45 +00:00
test_dvr_rpc.py Revert "DVR: Inter Tenant Traffic between networks not possible with shared net" 2018-08-22 23:26:37 -07:00
test_l3_rpc.py Use constant IP_VERSION_4/6 in unit tests 2018-08-27 21:45:39 +00:00
test_resources_rpc.py use common agent topics from neutron-lib 2018-03-13 11:35:50 -06:00
test_securitygroups_rpc.py Remove security_groups_provider_updated rpc code 2017-09-22 12:44:40 -04:00