Skip to content

Reconcile transport configuration and lifecycle with diagnostics #1404

Done

Description

@privateip

Parent: #1399

Dependencies

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/xmitdrops on main for 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-cni select 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

  1. added theissue type on Nov 14, 2026
  2. changed the title [-]Reconcile VLAN transport lifecycle and expose forwarding failures[/-] [+]Reconcile transport configuration and lifecycle with diagnostics[/+] on Nov 14, 2026
  3. self-assigned this
    on Nov 30, 2026
  4. privateip commented on Nov 30, 2026

    @privateip
    ContributorAuthor

    Starting implementation on feat/issue-1404, targeting epic/1399-vlan-transport. Plan, in order:

    1. Per-side transport resolution in a new shared package, 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. A Set exposes VLANLower(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.
    2. Per-node galactic-cni interface selection. A tagged side can be named on one node without changing the cluster-wide DaemonSet value for the others.
    3. Reconcile and cleanup of stale hooks and map rows across VLAN recreation, ifindex reuse, parent or member replacement and restart. Logs, counters and status follow the instrumentation conventions and reuse 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.

  5. privateip commented on Nov 30, 2026

    @privateip
    ContributorAuthor

    Delivered by #1538 (88383a1) and #1539 (d00d544), merged into the epic branch epic/1399-vlan-transport. internal/plumbing/transport resolves 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_NODE selects interfaces per node. Root tests in CI cover map cleanup across VLAN recreation and tagged/untagged switches, VLAN rows written before the hook attaches, and usid_ingress claiming 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 because Fixes only fires when the epic branch merges into main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions