commit a0d84422df11f7ba7737c9fa1f5835b4b431ade9
Author: Prakash M Bailkeri <email address hidden>
Date: Fri Aug 7 16:18:14 2015 +0530
Routepath Replicator should unregister from BgpTable only after all replicated routes are deleted
When the routing instance is deleted, route path replicator walks the route
table as part of Leave of rtgroup in import and export Route targets.
During the walk, it deletes all the replicated path/routes.
On walk complete, it unregisters from the DBTable. In the static route scenario,
the static route is added on the internal routing instance that has
"static-route-entries" property attached to it.
Such generated static route is replicated to destination VRF based on
"route-target-list" config in "static-route-entries.
Note: such internal routing instance doesn't have these route targets in its export_rt.
If this internal routing instance is deleted, route path replicator starts the
table walk as part of Leave of RtGroup in import and export. In case static
route module has not processed the config delete of static route entries,
it would not have deleted the static route added to inet route table.
On walk complete, it would unregister from the routing table.
Hence the replicated routes of Static route will never be deleted as
RouteReplicator module is no longer TableListener and doesn't process delete of
StaticRoute which happens when static route module process the delete request.
Proposed fix:
Routereplicator to keep track of replicated routes/dbstate added, and unregister
from DBTable only after all DBStates are clear (or after all replicated routes
from this table is deleted).
Added unit test code to Static route test and route replication test to
simulate the error condition and validate the fix
Reviewed: https:/ /review. opencontrail. org/12924 github. org/Juniper/ contrail- controller/ commit/ a0d84422df11f7b a7737c9fa1f5835 b4b431ade9
Committed: http://
Submitter: Zuul
Branch: R2.0
commit a0d84422df11f7b a7737c9fa1f5835 b4b431ade9
Author: Prakash M Bailkeri <email address hidden>
Date: Fri Aug 7 16:18:14 2015 +0530
Routepath Replicator should unregister from BgpTable only after all replicated routes are deleted
When the routing instance is deleted, route path replicator walks the route route-entries" property attached to it. route-entries.
table as part of Leave of rtgroup in import and export Route targets.
During the walk, it deletes all the replicated path/routes.
On walk complete, it unregisters from the DBTable. In the static route scenario,
the static route is added on the internal routing instance that has
"static-
Such generated static route is replicated to destination VRF based on
"route-target-list" config in "static-
Note: such internal routing instance doesn't have these route targets in its export_rt.
If this internal routing instance is deleted, route path replicator starts the
table walk as part of Leave of RtGroup in import and export. In case static
route module has not processed the config delete of static route entries,
it would not have deleted the static route added to inet route table.
On walk complete, it would unregister from the routing table.
Hence the replicated routes of Static route will never be deleted as
RouteReplicator module is no longer TableListener and doesn't process delete of
StaticRoute which happens when static route module process the delete request.
Proposed fix:
Routereplicator to keep track of replicated routes/dbstate added, and unregister
from DBTable only after all DBStates are clear (or after all replicated routes
from this table is deleted).
Added unit test code to Static route test and route replication test to
simulate the error condition and validate the fix
Change-Id: I5ddb05425401a3 6bf117a7971a3ab 7758494d39b
Closes-bug: #1482277