Propagate only negotiated afi/safi routes to adj-rib-out 97/90097/7
authorVikram Singh Kalakoti <vikramskalakoti@gmail.com>
Fri, 29 May 2020 16:10:50 +0000 (21:40 +0530)
committerAjay Lele <ajayslele@gmail.com>
Mon, 10 Aug 2020 04:38:16 +0000 (04:38 +0000)
commit12a27cee4bdc5a8e32848ca1f0e11f1883f42c37
treebbeba6e695c68fc844b79f5f8633e3f0b751a974
parentb481a55c539be1987b303cbfab9fb190b56828dc
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>
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