Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Problem and fixes: There were three different scenarios where agent was crashing. 1) Bgp-peer State on Vrf: Channel has gone down and peer has been decommisioned. This results in walk start. Before the walk one of the VRF is deleted. Walk reaches this deleted VRF and ignores it as it is delete marked assuming that notification will take care of removal of state. However before notification happens, walk is done and peer released. This results in failure as state is not yet removed. Fix: Dont ignore deleted VRF in walk for deleting peer. 2) Deleted route state addition: Again the same case of deleted peer i.e. channel has gone down resulting in walk to delete state for this peer. Every VRF walk is accompained with route table walk. There is a state maintained on route whose listener(on route table) is stored in state on VRF for that table. This listener on route table is deleted when route walk done is called. Walk itself would have deleted all states on route in this table. Point to note that walk done is enqueued for processing. So it may happen that there is some change in one of the route along with channel coming up with some other peer. RouteExport::Notify will get a call for that route and it will try to see if channel is active. Since new peer came up channel is seen as active. But this peer still has not added it vrf state. Hence Vrf state will be null. Issue happens here. Instead of returning after seeing no vrf state, processing continues and adds state back on route with old id (from old peer). Fix: Return when no vrf state is found. 3) Multicast route was adding state even though its delete marked. This was happening because in MulticastExport::Notify non-null state was and'd with route delete check for delete processing. So if state was null, route delete notification used to skip delete handling and instead land in addition of state. Fix: Decouple state check. Ignore delete notification and return when state is null. Change-Id: Ib5156a2ee6b72902a6ff75f05740549f19874241 Closes-bug: 1480375 (cherry picked from commit 116729f)
- Loading branch information
1 parent
57a6715
commit 350a8ee
Showing
3 changed files
with
251 additions
and
29 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
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