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

lxd/bgp: Rework start/stop logic (from Incus) #15173

Merged
merged 4 commits into from
Mar 17, 2025

Conversation

nmezhenskyi
Copy link
Contributor

@nmezhenskyi nmezhenskyi commented Mar 13, 2025

Includes cherry-pick from lxc/incus#1761.

Changes:

  • BGP listener is now started after all the networks are set up.
  • Predefined network forwards are now added correctly during the BGP listener start up.
  • Extended test/suites/network_forward to test the BGP listener start up and subsequent restart of LXD daemon.

@nmezhenskyi nmezhenskyi marked this pull request as draft March 13, 2025 13:48
@nmezhenskyi nmezhenskyi changed the title lxd: tart BGP listener after networks are set up lxd: Start BGP listener after networks are set up Mar 13, 2025
@nmezhenskyi nmezhenskyi force-pushed the fix-bgp-listener branch 2 times, most recently from 5fd468f to 74d89ab Compare March 13, 2025 23:16
This simplifies the BGP package a bit and improves on the ability to
reconfigure it.

The go-bgp ability to start/stop the daemon doesn't work reliably, so we
need to spawn a completely new listener instead.

This moves Start/Stop interactions to the main Reconfigure option and
makes sure to always feed all peers and prefixes on startup.

Signed-off-by: Stéphane Graber <[email protected]>
(cherry picked from commit 6a0d0137735c260b5872e27c7d94720e8d989228)
Signed-off-by: Nikita Mezhenskyi <[email protected]>
License: Apache-2.0
@nmezhenskyi nmezhenskyi changed the title lxd: Start BGP listener after networks are set up lxd/bgp: Rework start/stop logic (from Incus) Mar 14, 2025
@nmezhenskyi nmezhenskyi marked this pull request as ready for review March 15, 2025 00:45
simondeziel
simondeziel previously approved these changes Mar 15, 2025
Copy link
Member

@tomponline tomponline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future reference @nmezhenskyi we would want any corrections from code reviews to be rebased into the original commit not appended to the PR as an additional commit.

@tomponline tomponline merged commit db83b98 into canonical:main Mar 17, 2025
2 checks passed
@tomponline
Copy link
Member

Thansk!

@tomponline
Copy link
Member

@nmezhenskyi please update the cherry-pick doc, ta

@nmezhenskyi nmezhenskyi deleted the fix-bgp-listener branch March 18, 2025 14:53
@tomponline
Copy link
Member

@nmezhenskyi please can you include lxc/incus#1805 too

@nmezhenskyi nmezhenskyi restored the fix-bgp-listener branch March 18, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants