neutron/neutron/agent/l3
Swaminathan Vasudevan 9dc70ed77e DVR: Clear SNAT namespace when agent restarts after router move
When we manually move a router from one dvr_snat node to
another dvr_snat node the snat_namespace should be removed in
the originating node by the agent and will be re-created in the
destination node by the destination agent.

But when the agent dies, the router_update message reaches the
agent after the agent restarts. At this time the agent should
remove the snat_namespace since it is no more hosted by the
current agent.

Even though we do have logic in agent to take care of cleaning
up the snat namespaces if the gw_port_host does not match with the
existing agent host, in this particular use case the self.snat_namespace
is always set to 'None' in the dvr_edge_router init call when agent
restarts.

This patch fixes the above issue by initializing the snat namespace
object during the router_init. Since we do have a valid snat
namespace object and if the gw_port_host mismatches, the agent
should clean up the namespace.

Change-Id: I30524dc77b743429ef70941479c9b6cccb21c23c
Closes-Bug: #1557909
2016-05-04 11:09:26 -07:00
..
__init__.py Move classes out of l3_agent.py 2014-12-10 15:19:28 -07:00
agent.py Remove old fwaas remnants from neutron 2016-04-27 16:48:29 -05:00
config.py Use _ from neutron._i18n 2015-12-06 19:39:04 +09:00
dvr.py Merge "Fixes typos Openstack -> OpenStack" 2016-02-05 04:23:26 +00:00
dvr_edge_ha_router.py Use constants from neutron-lib 2016-04-23 21:23:56 -04:00
dvr_edge_router.py DVR: Clear SNAT namespace when agent restarts after router move 2016-05-04 11:09:26 -07:00
dvr_fip_ns.py Move all link-local cidr constants to a central location 2016-04-07 10:52:38 -04:00
dvr_local_router.py Remove old fwaas remnants from neutron 2016-04-27 16:48:29 -05:00
dvr_router_base.py Refactor router delete processing 2016-01-15 09:37:37 -06:00
dvr_snat_ns.py DVR: Clear SNAT namespace when agent restarts after router move 2016-05-04 11:09:26 -07:00
fip_rule_priority_allocator.py Preserve DVR FIP rule priority over Agent restarts 2015-08-12 15:52:19 -05:00
ha.py Use _ from neutron._i18n 2015-12-06 19:39:04 +09:00
ha_router.py Use constants from neutron-lib 2016-04-23 21:23:56 -04:00
item_allocator.py Move all link-local cidr constants to a central location 2016-04-07 10:52:38 -04:00
keepalived_state_change.py Use _ from neutron._i18n 2015-12-06 19:39:04 +09:00
legacy_router.py Use constants from neutron-lib 2016-04-23 21:23:56 -04:00
link_local_allocator.py Fix usage of netaddr '.broadcast' 2015-08-31 12:38:39 +00:00
namespace_manager.py Move i18n to _i18n, as per oslo_i18n guidelines 2015-12-01 19:29:10 -07:00
namespaces.py Move i18n to _i18n, as per oslo_i18n guidelines 2015-12-01 19:29:10 -07:00
router_info.py Use constants from neutron-lib 2016-04-23 21:23:56 -04:00
router_processing_queue.py Fix module's import order 2016-01-22 06:38:42 -08:00