8000 RIB Priority Changes by taspelund · Pull Request #359 · oxidecomputer/maghemite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

RIB Priority Changes #359

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

Merged
merged 4 commits into from
Sep 20, 2024
Merged

RIB Priority Changes #359

merged 4 commits into from
Sep 20, 2024

Conversation

taspelund
Copy link
Contributor

This primarily makes 5 changes:

  1. Move BGP's local_pref into BgpPathProperties (this is a BGP-specific attribute, let's store it with the other BGP-specific attributes)
  2. Rename the RIB's local_pref to rib_priority (since this is used by the RIB to prioritize certain protocols/paths over others)
  3. Fixes up tests to use the new nomenclature/structure
  4. Introduces new constants to represent default RIB priorities for Static and BGP protocols
  5. Enables RIB priority comparison in the RIB's bestpath selection algorithm

@taspelund taspelund added needs testing bgp Border Gateway Protocol labels Sep 9, 2024
@taspelund taspelund self-assigned this Sep 9, 2024
1. Adds local_pref to rdb::BgpPathProperties, since it's a BGP attribute
2. Updates bestpaths() to compare BgpPathProperties::local_pref instead
   of protocol-agnostic Path::local_pref.

Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
@taspelund taspelund force-pushed the trey/disabuse_local_pref branch from 27a6e13 to 726dbf8 Compare September 17, 2024 19:02
@taspelund taspelund marked this pull request as ready for review September 19, 2024 00:26
local_pref is a well-known BGP attribute, so let's not overload the term
for something that's unrelated to BGP (protocol priorities in the RIB).

Fixes: #343

Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
Enable comparison of rib_priority in the bestpath selection algorithm.

Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
Deliberately prefer static routes over bgp routes, even when the RIB
priority matches.

Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
@taspelund taspelund force-pushed the trey/disabuse_local_pref branch from dc77a80 to bb45625 Compare September 19, 2024 00:35
@@ -2070,13 +2070,14 @@ impl<Cnx: BgpConnection + 'static> SessionRunner<Cnx> {
let path = rdb::Path {
nexthop: nexthop.into(),
shutdown: update.graceful_shutdown(),
local_pref: update.local_pref(),
rib_priority: DEFAULT_RIB_PRIORITY_BGP,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we create a follow on issue to make this configurable? It seems to me that we'd want this to be configurable at the router level. Perhaps it could be useful as a per-session option. But for the purposes of this PR, a static value is fine.

Copy link
Collaborator
@rcgoodfellow rcgoodfellow left a comment

Choose a reason for hiding this comment

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

Just one comment on rib_priority configurability for BGP learned routes. Otherwise LGTM.

@taspelund taspelund merged commit 6b24f31 into main Sep 20, 2024
12 checks passed
@taspelund taspelund deleted the trey/disabuse_local_pref branch September 20, 2024 20:11
ahl added a commit to oxidecomputer/omicron that referenced this pull request Sep 27, 2024
This is kind of gross.

Omicron currently is out of sync with maghemite, see #6693 and the two
maghemite pushes that require synchronization:
oxidecomputer/maghemite#359 and
oxidecomputer/maghemite#360. I'd like to make
forward progress with the hyper v1 migration, and that's blocked on
updating the omicron dependency of maghemite which pulls in old hyper
(reqwest, progenitor, etc). This gets pull into other repos via
omicron-common.

It's worth noting that this circular arrangement seems lousy. The
"vassal crates" (crucible, propolis, maghemite, (and dendrite to a
lesser degree)) depend on omicron-common, but omicron-common pulls in
maghemite's `mg-admin-client` which in turn pulls in... lots...
including progenitor, hyper, reqwest, etc.

My goal here is to have a temporary dependency on a branch of maghemite
(oxidecomputer/maghemite#378); once #6693 is
integrated, we can then pin the dependency on maghemite's HEAD rev.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bgp Border Gateway Protocol needs testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0