-
Notifications
You must be signed in to change notification settings - Fork 4
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
RIB Priority Changes #359
Conversation
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>
27a6e13
to
726dbf8
Compare
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>
dc77a80
to
bb45625
Compare
@@ -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, |
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
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.
This primarily makes 5 changes:
local_pref
intoBgpPathProperties
(this is a BGP-specific attribute, let's store it with the other BGP-specific attributes)local_pref
torib_priority
(since this is used by the RIB to prioritize certain protocols/paths over others)