bgp: Allow router Stop without full destroy to fix Graceful Restart #39835
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As of #38008,
BGPRouterManager.Stop()
is called when BGP CP cell is being destroyed to properly clean up all servers when the agent is stopped. This change however affected Graceful Restart behavior and should be revisited:GoBGP sends a Cease notification to all BGP peers as part of the server
Stop()
implementation (code ref), which makes Graceful Restart on the peered routers ineffective.From rfc4724, section 4 - Graceful Restart Mechanism for BGP:
To make Graceful Restart work, we allow stopping the router without destroying GoBGP server, at least until GoBGP provides a way to not send Cease notifications upon server
Stop()
to GR-enabled peers.The Router's
Stop()
method now takes aStopRequest
argument, which can be used to specify whether full destroy of the Router is needed or not. Full destroy is helpful for tests, but for now it should not be used for standard Cilium agent use-case to make GR work upon agent termination.