Comment 27 for bug 1548265

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/19924
Committed: http://github.org/Juniper/contrail-controller/commit/5b0b979412bc5da9e1434cdb5ea950113e7c5b4a
Submitter: Zuul
Branch: R3.0

commit 5b0b979412bc5da9e1434cdb5ea950113e7c5b4a
Author: Prabhjot Singh Sethi <email address hidden>
Date: Thu May 5 14:18:18 2016 +0530

Assure Paths deleted before Peer

Issue:
------
In a scenario, where VRF delete is triggered followed by
BGP peer down, we see that some of the routes have Paths
pending from a deleted BGP Peer. which results in
segmentation fault and some times VRF delete timeouts

Issues happens because of two parallel vrf/route table
walks, with an assumptions that a walk in deleted VRF has
been started to clean up all the BGP paths will go fine

However if the BGP peer goes down in between it starts
a parallel walk for DELPEER and in this walk it skips
deleted VRF entries assuming the other walk will delete
paths from routes in deleted VRF

Now if DELPEER walk completes before the walk on deleted
VRF PEER pointer is free'd, further refering this free'd
memory doesnot assure the deletes of associated paths from
route, which will stay there till VRF delete timeout

Fix:
----
Don't skip deleted VRF in DELPEER walk to assure the
paths added for the current BGP PEER are deleted before
the PEER pointer is free'd

Closes-Bug: 1548265
Change-Id: I5a7ec0a62fd1de6101a117648d970ecc8949ea37
(cherry picked from commit 5a931126d165d1468aca781868a8da50d5b2e5d6)