feat(evpn): add managed VRF L3VXLAN status substrate#577
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.
Adds ADR-0091 managed-netdev schema/status support for VRF and L3 VXLAN (L3VXLAN), extending config validation, Linux link inventory parsing, and gRPC/CLI surfaces to report desired vs observed protected attributes without introducing lifecycle ops for these classes yet.
Changes:
- Extend
[managed_netdevs]schema + validation to acceptvrfsandl3vxlans, derive ownership stamps, and enforce protected-attribute constraints (table/VNI/router-MAC/learning). - Expand EVPN/Linux snapshot + reconcile status logic to inventory VRF links and report VRF/L3VXLAN observed state/attributes via
ListManagedNetdevs. - Update proto/API/CLI/docs/tests to surface new managed-netdev classes and their observed attributes.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/config/validation.rs | Adds VRF/L3VXLAN validation and refactors managed-netdev validation helpers. |
| src/config/tests.rs | Extends config tests to cover VRF/L3VXLAN parsing, stamps, and validation failures. |
| src/config/schema.rs | Adds ManagedVrfNetdevConfig and ManagedL3VxlanNetdevConfig schema blocks. |
| src/config/mod.rs | Builds ManagedNetdevTable entries for VRF/L3VXLAN from parsed config. |
| proto/rustbgpd.proto | Extends managed-netdev enums/state with VRF/L3VXLAN and observed fields. |
| docs/reload-matrix.md | Documents restart-required semantics and VRF/L3VXLAN status-only scope. |
| docs/grpc-method-inventory.md | Updates ListManagedNetdevs description to include VRF/L3VXLAN. |
| docs/evpn-vtep-setup.md | Notes VRF/L3VXLAN rows now support validation/status (no lifecycle). |
| docs/evpn-enablement.md | Updates roadmap/enablement narrative for VRF/L3VXLAN schema/status. |
| docs/adr/0091-evpn-managed-netdev-creation.md | Updates ADR-0091 text/examples for VRF/L3VXLAN schema/status tranche. |
| docs/adr/0088-evpn-vlan-aware-bridge-managed-netdev-boundary.md | Clarifies boundary: VRF/L3VXLAN status substrate added; lifecycle deferred. |
| docs/adr/0054-evpn-linux-dataplane-boundary.md | Documents VRF/L3VXLAN schema/status substrate addition under ADR-0091. |
| docs/CONFIGURATION.md | Adds configuration docs for managed_netdevs.vrfs and .l3vxlans and protected attributes list. |
| docs/API.md | Updates ListManagedNetdevs API docs + CLI output details for new observed fields. |
| crates/evpn/src/managed_netdev.rs | Adds VRF/L3VXLAN managed-netdev types/specs and stamp parsing support. |
| crates/evpn/src/lib.rs | Re-exports new managed-netdev types and stamp helper functions. |
| crates/evpn-linux/tests/reconcile_actor.rs | Updates test link fixtures for new vxlan fields (up/master/mac). |
| crates/evpn-linux/src/snapshot.rs | Extends kernel snapshot structs with VRF inventory + vxlan up/master/mac fields. |
| crates/evpn-linux/src/reconcile.rs | Adds VRF/L3VXLAN status classification, orphan reporting, and per-class stamp helpers. |
| crates/evpn-linux/src/linux/probe.rs | Updates link-cache test fixture to include VRF inventory map. |
| crates/evpn-linux/src/linux/notify.rs | Updates link-cache test fixture to include VRF inventory map. |
| crates/evpn-linux/src/linux/mod.rs | Plumbs VRF link inventory from cache into the published snapshot. |
| crates/evpn-linux/src/linux/links.rs | Extends netlink dump parsing for VRF links and vxlan up/master/mac. |
| crates/evpn-linux/src/in_memory.rs | Updates in-memory dataplane VXLAN link fixture for new fields. |
| crates/cli/src/test_support.rs | Updates mock managed-netdev state to include new observed fields. |
| crates/cli/src/commands/evpn.rs | Shows VRF/L3VXLAN observed fields in text/JSON output and labels new classes. |
| crates/api/src/evpn_service.rs | Maps new classes/observed fields into proto + expands RPC fixture tests. |
| ROADMAP.md | Notes VRF/L3VXLAN schema/status substrate landing and lifecycle deferral. |
| README.md | Updates top-level feature summary and “Not yet supported” list. |
| CHANGELOG.md | Adds entry describing managed VRF/L3VXLAN schema/status substrate. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| for (name, link) in &snapshot.links { | ||
| if desired.bridges.contains(name) { | ||
| continue; | ||
| } | ||
| let stamps = rustbgpd_stamps_for_class(&link.altnames, ManagedNetdevClass::Bridge); | ||
| if !stamps.is_empty() { | ||
| rows.push(unconfigured_managed_bridge_status( | ||
| name, | ||
| link, | ||
| observed_stamps, | ||
| stamps, | ||
| managed.owner_token(), | ||
| )); | ||
| } | ||
| for (name, link) in &snapshot.vxlans { | ||
| if desired_vxlan_names.contains(name) { | ||
| continue; | ||
| } | ||
| let observed_stamps = rustbgpd_stamps(&link.altnames); | ||
| if observed_stamps.is_empty() { | ||
| continue; | ||
| } | ||
| rows.push(unconfigured_managed_vxlan_status( | ||
| } |
| ( | ||
| ManagedNetdevState::OwnedUnsafe, | ||
| "rustbgpd-stamped VRF is not configured but is not owned by this daemon".to_string(), | ||
| ) | ||
| }; |
| } else { | ||
| ( | ||
| ManagedNetdevState::OwnedUnsafe, | ||
| "rustbgpd-stamped L3VXLAN is not configured but is not owned by this daemon" | ||
| .to_string(), | ||
| ) | ||
| }; |
…F/L3VXLAN validation (#578) Follow-up to #577. Status/validation only — no change to compute_managed_netdev_ops or any reap gate (reap stays class-exact). - Restore all-class visibility in the unconfigured managed-netdev status scan: a link carrying a rustbgpd ownership stamp of a class that does not match its kind is reported owned-unsafe instead of being silently dropped (ADR-0091 Decision 6); the fallback never double-emits. - Reword the owned-unsafe status reasons across all four classes to cover wrong-class / multiple-stamp / stamp-name-mismatch. - Reject reserved VRF table_ids (252-255), a VRF table_id colliding with a [[fib_tables]] table_id, and an L3VXLAN VNI (L3VNI) colliding with a fixed-VNI VXLAN VNI (L2VNI). Operator-provisioned vrf/bridge references stay fail-closed at runtime, not hard-validated.
Summary
[[managed_netdevs.vrfs]]and[[managed_netdevs.l3vxlans]]rows, including table/VNI/router-MAC/learning constraintsLifecycle boundary
This intentionally does not add VRF/L3VXLAN create/adopt/reap.
compute_managed_netdev_ops()still emits lifecycle ops only for managed bridges and fixed-VNI VXLANs; VRF/L3VXLAN rows are status/protected-attribute diagnostics for LAN-94, with lifecycle deferred to LAN-95.Verification
cargo fmt --all -- --checkcargo test -p rustbgpd managed_netdevcargo test -p rustbgpd-evpn managed_netdevcargo test -p rustbgpd-evpn ip_vrf::readinesscargo test -p rustbgpd-evpn-linux managed_netdev_statuscargo test -p rustbgpd-evpn-linux ip_vrfcargo test -p rustbgpd-evpn-linux linux::linkscargo test -p rustbgpd-api list_managed_netdevscargo test -p rustbgpctl managed_netdevcargo clippy --workspace --all-targets -- -D warningsLinear: LAN-94