Add logic to import/un-import static routes upon instance add/delete
The code in RoutePathReplicator::[Join|Leave] triggers import and
cleanup of routes by scheduling walks of tables that have the import
target being added/deleted in their export target list.
This is not effective for static routes since static routes live in
tables that do not have the route targets assocaited with the static
routes.
The ideal fix would be to maintain a dependency list of static routes
for each route target.
Implement a simpler fix for now, which is to trigger notification of
all static routes when an import target is added/deleted to a table.
This should have acceptable performance since the number of static
routes is usually relatively small.
Maintain a list of non-empty StaticRouteMgrs in the BgpServer so that
we don't have to iterate through all RoutingInstances in order to walk
all static routes.
Reviewed: https:/ /review. opencontrail. org/11884 github. org/Juniper/ contrail- controller/ commit/ 78b330848ca26bc 84a5c3dbe86cc34 698d1d5b39
Committed: http://
Submitter: Zuul
Branch: R2.1
commit 78b330848ca26bc 84a5c3dbe86cc34 698d1d5b39
Author: Nischal Sheth <email address hidden>
Date: Thu Jun 18 23:28:20 2015 -0700
Add logic to import/un-import static routes upon instance add/delete
The code in RoutePathReplic ator::[ Join|Leave] triggers import and
cleanup of routes by scheduling walks of tables that have the import
target being added/deleted in their export target list.
This is not effective for static routes since static routes live in
tables that do not have the route targets assocaited with the static
routes.
The ideal fix would be to maintain a dependency list of static routes
for each route target.
Implement a simpler fix for now, which is to trigger notification of
all static routes when an import target is added/deleted to a table.
This should have acceptable performance since the number of static
routes is usually relatively small.
Maintain a list of non-empty StaticRouteMgrs in the BgpServer so that
we don't have to iterate through all RoutingInstances in order to walk
all static routes.
Change-Id: I559e014fd1fd00 1c5209dce8ab3e7 564048889c7
Closes-bug: 1466755