]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Cleanup dhcp namespace upon dhcp setup.
authorEugene Nikanorov <enikanorov@mirantis.com>
Sun, 25 Oct 2015 11:47:38 +0000 (15:47 +0400)
committerEugene Nikanorov <enikanorov@mirantis.com>
Fri, 13 Nov 2015 15:55:01 +0000 (19:55 +0400)
commit6ac43c119bff9da93f438d10033b209819a32230
treea1ef1f016089881ac5205fb64fbb417df520bbcd
parent44d73d1ad3073958c8d5cce933deedc7e6ea5f83
Cleanup dhcp namespace upon dhcp setup.

In some cases when more than 1 DHCP agents were assigned
to a network and then they became dead, their DHCP ports
become reserved. Later, when those agents revive or start
again, they acquire reserved ports, but it's not guaranteed
that they get exactly same ports. In such case DHCP agent
may create interface in the namespaces despite that another
interface already exist. In such case there will be two
hosts with dhcp namespaces each containing duplicate ports,
e.g. one port will be present on two hosts. This breaks
DHCP.

Closes-Bug: #1509959
Change-Id: I34eb1ad5c44dd3528c9910462e26536186e7a4fb
neutron/agent/linux/dhcp.py
neutron/tests/functional/agent/linux/test_dhcp.py [new file with mode: 0644]
neutron/tests/unit/agent/dhcp/test_agent.py