]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
DVR: fix router rescheduling on agent side
authorOleg Bondarev <obondarev@mirantis.com>
Tue, 7 Jul 2015 10:36:00 +0000 (13:36 +0300)
committerOleg Bondarev <obondarev@mirantis.com>
Tue, 18 Aug 2015 14:18:35 +0000 (17:18 +0300)
commita264b329df82f3c391f75bd9ad73a1327616a43d
treefc6bd5679fc1c06130cf304ec9ac5bbd60b0ea8b
parentf5344dec5b80e38db8ffea10c944ef59b26ebe48
DVR: fix router rescheduling on agent side

The patch makes L3 agent aware of possible SNAT role
rescheduling to/from it.
The gist is to compare gw_port host change.
If it was changed and agent is not on target host then
it needs to clear snat namespace if one exists. If agent
is on target host it needs to create snat namespace from
scratch if it doesn't exist.

Host field was excluded from gw_port comparison on
agent side as part of HA Router feature implementation.
This code was moved to corresponding module.

Closes-Bug: #1472205
Change-Id: I840bded9eb547df014c6fb2b4cbfe4a876b9b878
neutron/agent/l3/dvr_edge_router.py
neutron/agent/l3/ha_router.py
neutron/agent/l3/router_info.py
neutron/tests/unit/agent/l3/test_agent.py