]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix-DVR Gateway clear doesn't delete csnat port
authorSwaminathan Vasudevan <swaminathan.vasudevan@hp.com>
Tue, 29 Jul 2014 23:34:58 +0000 (16:34 -0700)
committerSwaminathan Vasudevan <swaminathan.vasudevan@hp.com>
Thu, 31 Jul 2014 17:18:57 +0000 (10:18 -0700)
commit86a0adefe326116ae42c0e01a8fa2c2849bfa2c2
treed9f7de768b728caa579ed6a972bc1443000622c3
parentf32c0ebe68f0ad27ac7a9717ef3f6e3406f953a1
Fix-DVR Gateway clear doesn't delete csnat port

When a gateway is set to a distributed router,
the router checks for the interfaces associated
with the router and based on the number of
interfaces the router creates "csnat" interface
ports that would be used by the SNAT service in
the Service Node.

When a gateway is cleared, the plugin should
delete the "csnat" interface ports. In the
current code, it is deleting the port and
re-creating the port with a different id.

A check need to be made before it creates a new
port to make sure that the router has a valid
gateway port.

This is a bug and this patch fixes this issue.

Change-Id: I84f1795360b3693a025b5fa3454bf9efc7e503ae
Closes-Bug: #1350089
neutron/db/l3_dvr_db.py
neutron/tests/unit/db/test_l3_dvr_db.py