Skip to content

[mcast, pt3] mgd admin API + mgadm for the MRIB - #959

Open
zeeshanlakhani wants to merge 10 commits into
zl/mcast-rdbfrom
zl/mcast-admin
Open

zeeshanlakhani wants to merge 10 commits into
zl/mcast-rdbfrom
zl/mcast-admin

Conversation

@zeeshanlakhani

@zeeshanlakhani zeeshanlakhani commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

The third part of a series of recut (and properly refactored) PRs split from #675/#696.

This exposes rdb MRIB access through mg-admin and mgadm. We introduce multicast support by way of a new API version, adding the following endpoints:

  • GET /mrib/status/{imported,selected} -> lists mrib_in/mrib_loc. Every query param (group, source, vni, address family, origin) forms a logical AND combination filter, and a miss just returns an empty list.
    • No default vni (77 is OPTE/omicron policy).
    • Impossible combos (source/group IP family mismatch, an invalid source, a group/source outside the requested IP address family) are ruled out with a 400 (MribQueryError).
  • PUT|DELETE|GET /static/mroute -> add, remove, and list static multicast routes.

Includes:

  • mgadm adds new read-only commands: mrib status imported|selected and static get-mroutes for inspection. Omicron owns group membership and lifecycle, and programs routes through the API.
  • mg-admin-client re-exports latest::mrib (as mg_admin_client::mrib) and the pinned v14 module.
  • The testing feature is forwarded through mg-api-types and mg-admin-client, giving way for Omicron proptests to import the Arbitrary impls from [mcast, pt1] multicast address, source, and route key types #943 without a direct mg-api-types-versions dep.
  • Handler tests, including HTTP tests for the route lifecycle through mg-admin-client and invalid query/body rejection.
  • Shared test fixtures across BGP, static-route, and MRIB setups.
    • test_ctx keeps its TestDb guard for the lifetime of a context. The previous setup removed the DB directory while it was still in use in the context.
    • TestServer awaits server shutdown before DB cleanup.

The third part of a series of recut (and properly refactored) PRs split
from #675/#696.

This exposes rdb MRIB access through `mg-admin` and `mgadm`. We
introduce multicast support by way of a new API version, adding
the following endpoints:

- `GET /mrib/status/{imported,selected}` -> lists `mrib_in`/`mrib_loc`
  (address family + origin filters) or looks up a specific route when
  `group` is provided:
  - `(*,G)` lookup when `source` is omitted.
  - `(S,G)` lookup when `source` is provided. SSM requires `source`.
  - Note: `vni` defaults to 77.
  - Invalid keys result in a 400 (`MulticastRouteError`), and a miss is a 404.
- `PUT|DELETE|GET /static/mroute` -> add, remove, and list static
  multicast routes.

Includes:
- `mgadm` adds new read-only commands: `mrib status imported|selected` and
  `static get-mroutes` for inspection. Omicron owns
  group membership and lifecycle, and programs routes through the API.
- Handler tests, including HTTP tests for the route lifecycle through
  `mg-admin-client` and invalid query/body rejection.
- Shared test fixtures across BGP, static-route, and MRIB
  setups.
  - `test_ctx` keeps its `TestDb` guard for the lifetime of a context.
    The previous setup removed the DB directory while it was still in
    use in the context.
  - `TestServer` awaits server shutdown before DB cleanup.
@zeeshanlakhani zeeshanlakhani self-assigned this Oct 22, 2026
@zeeshanlakhani zeeshanlakhani added the multicast Multicast-related feature/impl label Oct 22, 2026
@zeeshanlakhani
zeeshanlakhani added this pull request to stack #958 October 22, 2026 18:33
… mrib

This change allows Omicron to enable MRIB `Arbitrary` impls through
the crates it already depends on, while we have re-exports to expose
the types (at latest + version).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

multicast Multicast-related feature/impl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant