]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Split the FIP Namespace delete in L3 agent for DVR
authorSwaminathan Vasudevan <swaminathan.vasudevan@hp.com>
Wed, 30 Sep 2015 18:15:52 +0000 (11:15 -0700)
committerCarl Baldwin <carl@ecbaldwin.net>
Mon, 19 Oct 2015 22:10:33 +0000 (22:10 +0000)
commitc874f6dadaa983ed4f338808907c8829a7f86031
treea3a7d11781d2c98ae05fdcadc2ad595725d76648
parentd57c546f1f07e66ad2c00b6dffe6cac87b017214
Split the FIP Namespace delete in L3 agent for DVR

Right now we are seeing a race condition in the l3 agent
for DVR routers when a floatingip is deleted and created.

The agent tries to delete the floatingip namespace and
while it tries to delete there is another call to add a
namespace. There is a timing window in between these two
calls where sometimes the call to create a namespace succeeds
but, when tried to execute any commands in the namespace
it fails, since the namespace was deleted concurrently.

Since the fip namespace is associated with an external net
and each node has only one fip namespace for an external net,
we would like to only delete the fip namespace when the
external net is deleted.

The first step is to split the delete functionality into two.
The call to fip_ns.cleanup will only remove the dependency that
the fipnamespace has with the router namespace such as fpr and
rfp veth pairs.

The call to fip_ns.delete will actually delete the
the fip namespace and the fg device.

Partial-Bug: #1501873
Change-Id: Ic94625d5a968f554af70c274b2b2c20ab64e2487
neutron/agent/l3/dvr_local_router.py
neutron/tests/functional/agent/test_l3_agent.py
neutron/tests/unit/agent/l3/test_dvr_local_router.py