Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Routepath Replicator should unregister from BgpTable only after all r…
…eplicated 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: 1. Implement LifeTimeActor in TableState to manage the unregister of listener and delete of tableState object. TableState object takes the delete reference to the BgpTable and attempt to delete is only made if BgpTable is deleted. TableState can be deleted if GroupList is empty & Replicated route count is zero and table doesn't have pending tableWalks 2. Implement GetDBStateCount() api in DBTableBase class to fetch DBState count for a given listener Added unit test code to Static route test and route replication test to simulate the error condition and validate the fix Change-Id: I9eb2b94aef9e112e29dea73fde5d38808e3b18b0 Closes-bug: #1482277 (cherry picked from commit c7a8736)
- Loading branch information
Showing
5 changed files
with
330 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.