Propagate only negotiated afi/safi routes to adj-rib-out 72/91972/3
authorVikram Singh Kalakoti <vikramskalakoti@gmail.com>
Fri, 29 May 2020 16:10:50 +0000 (21:40 +0530)
committerRobert Varga <nite@hq.sk>
Mon, 7 Dec 2020 13:28:06 +0000 (13:28 +0000)
commit6d0582e80735f70934ce70e980a8abd7a2842a25
treed184650a03b17ef12b22de252f97931130abf143
parent9809c6d7ae35380fbf36e609b4348683b8f30b64
Propagate only negotiated afi/safi routes to adj-rib-out

When BGP session comes, empty entries for negotiated afi/safi are
created in peer's adj-rib-out. If routes belonging to afi/safi
that were not negotiated for the peer are present in loc-rib,
those entries are being propagated to the peer, resulting in
ModifiedNodeDoesNotExistException. Patch prevents this by allowing
routes for only the negotiated afi/safi to be propagated from
loc-rib to peer's adj-rib-out.

If routes are written to non-existent afi/safi table in adj-rib-out,
it results in transaction chain failure which leads to a scenario
where multiple threads block to get a lock on BGPPeer but the
thread handling transaction failure is waiting for the submitted
futures to exit. Patch fixes this scenario by preventing wait on
the submtited futures when handling transaction failures.

JIRA: BGPCEP-906
Change-Id: I836d1828c3d552e4d62be0688040490ec3f36912
Signed-off-by: Vikram Singh Kalakoti <vikramskalakoti@gmail.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 12a27cee4bdc5a8e32848ca1f0e11f1883f42c37)
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/AbstractPeer.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/BGPPeer.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/LocRibWriter.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/state/BGPPeerStateImpl.java