]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Simplify keepalived.virtual_routes
authorAssaf Muller <amuller@redhat.com>
Mon, 2 Mar 2015 16:29:51 +0000 (11:29 -0500)
committergong yong sheng <gong.yongsheng@99cloud.net>
Mon, 20 Apr 2015 06:49:37 +0000 (14:49 +0800)
commite214b56da9205be7ba927142cc92e4f69ad09b01
treeea113be4d9cb233a85d8fe7dbdfbbf9c1103d572
parent949f6e23b3e0af79c89d6ebb1a5add0a64f62028
Simplify keepalived.virtual_routes

keepalived.virtual_routes previously held one list of virtual
routes of different kinds, and the HA router class manipulated
that list directly. The list held both the default gateway
virtual route, and any extra routes. This means that when adding
extra routes for example, the HA router would first have to
remove all routes that are not default gateway routes, then add
the extra routes received via RPC.

This is messy because:
a) It's needlessly complicated
b) It's fragile
c) There's zero separation of concerns (HA router should not know
   how keepalived maintains its list of virtual routes)
d) It requires changes to the management of the default gateway
   and virtual routes just to add another type of extra routes

This patch solves these issues by separating the persistency of
virtual routes according to their role.

Co-Authored-By: gong yong sheng <gong.yongsheng@99cloud.net>
Related-Bug: 1414640
Change-Id: I1406b1876c3a47b110818686b42e5f2f688154fa
neutron/agent/l3/ha_router.py
neutron/agent/linux/keepalived.py
neutron/tests/unit/agent/linux/test_keepalived.py