Repository navigation
Description
Parent: #1399
Dependencies
- Define configurable tagged and untagged transport contracts #1400 — Define configurable tagged and untagged transport contracts
- Characterize tagged and untagged TC and XDP forwarding #1401 — Characterize tagged and untagged TC and XDP forwarding
- Complete TC forwarding and isolation for both transport modes #1402 — Complete TC forwarding and isolation for both transport modes (for final acceptance)
- Complete gateway and NAT forwarding for both transport modes #1403 — Complete gateway and NAT forwarding for both transport modes (for final acceptance)
- Base-branch decision recorded in Support configurable tagged and untagged public and fabric transport #1399: whether this PR targets
mainorintegration/galactic-worker(Deliver Galactic Worker with Local and Fabric delivery for tenant services #1430).
Deliverable
Idempotent configuration and hook/coverage recovery for supported tagged and untagged topologies, with diagnostics that distinguish missing attachment, unsupported layout, forwarding failure, and host-stack fallback.
Work items
- Scope desired interface/role/tag state and diagnostics independently to public and fabric sides. Reconfigure one side's mode, parent, or VLAN ID without silently changing the other; remove stale old-side state while preserving shared-hook users and unrelated traffic. Define and test any necessary coordinated interruption rather than assuming zero disruption.
- Implement the contract's reconfiguration procedure for VLAN ID changes, parent changes, and tagged/untagged transitions. Required restarts and interruption must be explicit; reconcile old/new interface and tag context without stale hooks/maps or unintended cross-VLAN forwarding. Infrastructure remains responsible for interface creation/persistence.
- Reconcile VLAN deletion/recreation, parent/member replacement, ifindex reuse, route/neighbor changes, and daemon restart without stale hooks, map entries, or accidental adoption of another interface's state.
- Preserve shared XDP users and traffic on unaffected VLANs during partial failure and cleanup. Keep logical desired coverage distinct from physical hook coverage and actual forwarding health.
- Add or reuse actionable logs, counters, and status using Galactic's instrumentation conventions. Cover asynchronous redirect failure and fallback visibility where available, reusing
internal/plumbing/ebpf/xmitdropsonmainfor kernel-dropped XDP redirects, with explicit observability limits.
Findings from #1401
The baseline report (docs/archive/benchmarks/vlan-transport-baseline-2026-11-30.md) adds three items to this task:
- Resolve a selected VLAN netdevice into its parent, its members and its VLAN ID for the XDP attach paths.
- Reject VLAN ID 0, 802.1ad devices and stacked VLANs in Galactic validation. The kernel accepts all three, so only Galactic can catch them.
- Let
galactic-cniselect a different transport interface on each node. One cluster-wide DaemonSet cannot name a tagged side when the same interface is public on one node and fabric on another.
Sequencing
Lifecycle design, fixtures, and diagnostics preparation can start after discovery. Final integrated acceptance additionally requires the TC and gateway/NAT implementations from the parent epic; do not create a dependency on final hardware qualification.
Acceptance
Lab checks deferred. Under #1399's 2026-11-30 decision, this PR carries unit tests and real-kernel root tests. Every check below that needs the shared containerlab lab runs in #1405's end-of-epic lab pass instead, and is not a merge gate here.
- Exercise public-side changes with fabric configuration held fixed, then fabric-side changes with public configuration held fixed. Verify public gateway/DSR/NAT and control traffic after recovery, correct tags on both links, no stale cross-role state, and the documented impact on unaffected traffic.
- Starting from a working tagged configuration, change the VLAN ID and parent, then switch to untagged operation and back using the documented procedure. Verify the selected tag or absence of a tag, removal of obsolete coverage/context, successful recovery, and preservation of unrelated traffic. Repeat applicable failure/restart tests in both modes.
- Failure injection demonstrates member loss/replacement, VLAN recreation with ifindex reuse, neighbor expiry, route withdrawal/restoration, and CNI/router/gateway/NAT restart for applicable components.
- Recovery meets the contract's measured targets; stale state is absent after cleanup, and unaffected VLANs, tenants, and dispatcher users continue forwarding according to the contract.
- Operators can distinguish attachment coverage from successful packet delivery and identify claim/drop/fallback/redirect failure outcomes. Instrumentation adoption checks pass for added metrics/loggers.
- The delivering PR carries reproducible real-kernel/lab evidence against integrated datapath artifacts and closes this task on merge.
Activity
[-]Reconcile VLAN transport lifecycle and expose forwarding failures[/-][+]Reconcile transport configuration and lifecycle with diagnostics[/+]privateip commentedon Nov 30, 2026
Starting implementation on
feat/issue-1404, targetingepic/1399-vlan-transport. Plan, in order:internal/plumbing/transport. It turns a selected logical interface into its side, mode, VLAN ID, parent and physical members, read from netlink only. Validation rejects a missing interface, VLAN ID 0, 802.1ad, stacked VLANs, a missing parent, a parent that is not a NIC, bond or (test-only) veth, and public and fabric sides that resolve to the same logical interface or to overlapping untagged members. Each failure is a typed error naming the side, the interface and the rule. ASetexposesVLANLower(ifindex)for Complete gateway and NAT forwarding for both transport modes #1403's VLAN egress map. Per-side diagnostics are a structured log value and an info gauge.galactic-cniinterface selection. A tagged side can be named on one node without changing the cluster-wide DaemonSet value for the others.xmitdrops.Tests: unit tests with a fake netlink view, plus real-kernel root tests that build VLANs, 802.1ad and stacked VLANs, bonds and veths in a network namespace. Lab rows are deferred to #1405 as the issue records. Wiring into the gateway and NAT XDP paths waits for #1402 and #1403 to merge into the epic branch.
feat(transport): Resolve per-side tagged and untagged transport
fix(cni): Give the run container its node name
feat(cni): Select and check transport interfaces per node
feat(cni): Select and check transport interfaces per node
feat(cni): Select and check transport interfaces per node
refactor(vlanegress): Resolve VLAN egress through transport
refactor(attach): Derive usid transport context from transport
test(vlanegress): Follow VLAN recreation and mode changes on a kernel
docs(transport): Describe reconciliation after VLAN recreation
style(edgeattach): Order the transport import
test(edgeattach): Deliver same-node gateway traffic through usid_ingress
feat(transport): Select, check and report transport sides
test(attach): Check transport rows are written before attaching
privateip commentedon Nov 30, 2026
Delivered by #1538 (88383a1) and #1539 (d00d544), merged into the epic branch
epic/1399-vlan-transport.internal/plumbing/transportresolves each side's mode, parent, members and VLAN ID from netlink. It rejects VLAN ID 0, 802.1ad and stacked VLANs, and overlapping sides. The gateway, NAT and CNI all use it.GALACTIC_CNI_EBPF_INTERFACES_BY_NODEselects interfaces per node. Root tests in CI cover map cleanup across VLAN recreation and tagged/untagged switches, VLAN rows written before the hook attaches, andusid_ingressclaiming same-node delivery on the public VLAN in both host modes. #1542 tracks making DSR return side-aware. Lab rows run in #1405. Closed by hand becauseFixesonly fires when the epic branch merges intomain.feat(transport): Resolve per-side tagged and untagged transport
feat(transport): Select, check and report transport sides
test(attach): Check transport rows are written before attaching