neutron/neutron/tests
Swaminathan Vasudevan c334eb215a DVR: Clean stale snat-ns by checking its existence when agent restarts
At present there is no clear way to distinguish when the snat_namespace
object is initialized and when the actual namespace is created.
There is no way to check if the namespace already existed. The
code was only checking at the snat_namespace object instead of its
existence.

This patch addresses the issue by adding in an exists method to the
namespace object to identify the existence of the namespace in the
given agent.

This would allow us to check for the existence of the namespace,
and also allow us to identify the stale snat namespace and
delete the namespace when the gateway is cleared as the agent restarts.

This also applies for conditions when the router is manually moved
from one agent to another agent while the agent is dead. When the
agent wakes up it would clean up the stale snat namespace.

Closes-Bug: #1557909

(cherry picked from commit acd04d668b)

Conflicts:
	neutron/agent/l3/agent.py
	neutron/agent/l3/dvr_edge_ha_router.py
	neutron/agent/l3/dvr_edge_router.py
	neutron/tests/functional/agent/l3/test_dvr_router.py

Change-Id: Icb00297208813436c2a9e9a003275462293ad643
2016-08-05 15:44:12 -07:00
..
api Merge "Continue the fwaas decoupling and cleanup" into stable/liberty 2016-07-19 01:54:33 +00:00
common Restore old assert_ping behavior 2016-08-04 21:02:12 +00:00
contrib Adds base in-tree functional testing of the dhcp agent (OVS) 2016-04-01 16:45:58 +02:00
etc Postpone heavy policy check for ports to later 2016-02-09 13:47:53 +01:00
fullstack fullstack: Use noop firewall 2016-05-26 17:11:12 +00:00
functional DVR: Clean stale snat-ns by checking its existence when agent restarts 2016-08-05 15:44:12 -07:00
retargetable Remove lingering traces of q_ 2015-07-07 17:04:44 -04:00
tempest Continue the fwaas decoupling and cleanup 2016-07-15 18:09:02 -07:00
unit DVR: Clean stale snat-ns by checking its existence when agent restarts 2016-08-05 15:44:12 -07:00
var Allow combined certificate/key files for SSL 2014-04-13 09:22:23 +00:00
__init__.py Add eventlet monkey_patch helper 2015-03-24 08:44:00 -07:00
base.py Switched from fixtures to mock to mock out starting RPC consumers 2016-04-08 10:50:05 +02:00
fake_notifier.py Pass serializer to oslo.messaging Notifier 2014-06-20 14:58:28 +02:00
post_mortem_debug.py Cleanup recent generalization in post mortem debugger 2014-12-04 15:28:11 +01:00
tools.py test_db_base_plugin_v2: Skip a few tests on some platforms 2015-11-02 17:29:16 +01:00