Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress fib funny business (backport #15634) #15663

Merged
merged 2 commits into from
Apr 3, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Apr 3, 2024

See 2nd commit for the real meat.

Effectively w/ suppress-fib-pending a withdrawal will not be sent to a peer if BGP is already in the process of waiting for a previous route install for the same route.
ie suppose you have 2 way ecmp w/ bgp-suppress-fib-pending. peer 1 withdraws, bgp marks the route for FIB_INSTALLING and does not send an update. Then if peer 2 withdraws it's route before zebra gives notice, when attempting to send the route via group_announce_route it sees the FIB_INSTALLING flag and does not send the withdrawal.

Closes: #15626


This is an automatic backport of pull request #15634 done by Mergify.

When BGP has been asked to wait for FIB installation, on route
removal a return call is likely to not have the dest since BGP
will have cleaned up the node, entirely.  Let's just note that
the prefix cannot be found if debugs are turned on and move on.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 7c60314)
Currently BGP attempts to send route change information
to it's peers *before* the route is installed into zebra.
This creates a bug in suppress-fib-pending in the following
scenario:

a) bgp suppress-fib-pending and bgp has a route with
2 way ecmp.
b) bgp receives a route withdraw from peer 1.  BGP
will send the route to zebra and mark the route as
FIB_INSTALL_PENDING.
c) bgp receives a route withdraw from peer 2.  BGP
will see the route has the FIB_INSTALL_PENDING and
not send the withdrawal of the route to the peer.
bgp will then send the route deletion to zebra and
clean up the bgp_path_info's.

At this point BGP is stuck where it has not sent
a route withdrawal to downstream peers.

Let's modify the code in bgp_process_main_one to
send the route notification to zebra first before
attempting to announce the route.  The route withdrawal
will remove the FIB_INSTALL_PENDING flag from the dest
and this will allow group_announce_route to believe
it can send the route withdrawal.

For the master branch this is ok because the recent
backpressure commits are in place and nothing is going
to change from an ordering perspective in that regards.
Ostensibly this fix is also for operators of Sonic and
will be backported to the 8.5 branch as well.  This will
change the order of the send to peers to be after the
zebra installation but sonic users are using suppress-fib-pending
anyways so updates won't go out until rib ack has been
received anyways.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 329d5a5)
@mergify mergify bot mentioned this pull request Apr 3, 2024
@frrbot frrbot bot added the bgp label Apr 3, 2024
@ton31337 ton31337 merged commit c3d1267 into stable/9.1 Apr 3, 2024
12 checks passed
@ton31337 ton31337 deleted the mergify/bp/stable/9.1/pr-15634 branch April 3, 2024 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants