]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Update dhcp agent cache for network:dhcp ports
authorsridhargaddam <sridhar.gaddam@enovance.com>
Mon, 27 Jul 2015 03:46:48 +0000 (03:46 +0000)
committersridhargaddam <sridhar.gaddam@enovance.com>
Wed, 29 Jul 2015 14:59:51 +0000 (14:59 +0000)
commitf0e8356d04d04600c072a1c0f0bdf274ff19ab8c
treeee472ff943ac641fea05d4a85006d296a45e7258
parent12aa832ede1e27e68d055fedf699de53ec57746d
Update dhcp agent cache for network:dhcp ports

When a network with a dhcp_enabled subnet is scheduled on a dhcp
agent, dhcp driver creates the network:dhcp port for the subnet.
However, the port info is not updated in dhcp agents internal cache.
Subsequently if the user deletes the network:dhcp port, the port is
properly deleted on the server side (i.e., in the database) and when
the port_delete_end notification is sent to the dhcp agent, it simply
ignores it as the port entry would be missing in the cache. This patch
fixes this issue by updating the dhcp agents cache when dhcp driver
creates the network:dhcp port for the subnets.

Closes-Bug: #1478426
Change-Id: I69f5834dd964a4320c606c4e0aa2cdba70416943
neutron/agent/linux/dhcp.py
neutron/tests/unit/agent/dhcp/test_agent.py