Skip to content

Gateway and NAT stay Ready when a transport selection fails validation #1546

Done

Description

@privateip

Parent: #1399

Observed

In the #1405 lab run on the epic branch (cell C1, native mode), each invalid transport selection below made galactic-gateway and galactic-nat log transport: side failed validation with the right rule and interface. Both then stayed Ready with 0 restarts:

  • VLAN ID 0 (vlan_id_out_of_range)
  • an 802.1ad device (vlan_protocol_unsupported)
  • a stacked VLAN (stacked_vlan)
  • an unsupported parent type (parent_type_unsupported)

galactic-cni already refuses to start on these (#1539).

Expected

Contract §5 (Validation) in docs/designs/vlan-transport/contract.md requires a component to fail on an invalid selection, not log and continue. Each component should refuse to start, or report not-ready, naming the rule, as galactic-cni does.

Work items

  • Make galactic-gateway and galactic-nat refuse to start, or report not-ready, on any transport.ValidationError, naming the rule and interface.
  • Make a missing interface log interface_not_found in both components. Today they crash-loop without naming the rule.

Acceptance

Activity

  1. added theissue type on Dec 1, 2026
  2. privateip commented on Dec 1, 2026

    @privateip
    ContributorAuthor

    Confirmed on epic/1399-vlan-transport (a526d86): syncVLANEgress in cmd/galactic-gateway/gateway.go and cmd/galactic-nat/nat.go passes a transport.ValidationError to Tracker.Fail, which only logs and counts it. A missing interface fails earlier, in edgeattach.ResolveTargets / natattach.ResolveUplinks, before any transport resolution runs, so no rule is named.

    Plan (one PR with #1547):

    • internal/plumbing/transport: add Tracker.Record(set, err), which publishes a resolution, logs and counts a failure once while it persists, and keeps the current validation failure for readiness.
    • galactic-gateway and galactic-nat: resolve the configured logical interfaces through the transport contract before the hook targets are expanded or the XDP mode is selected. A ValidationError at startup, including interface_not_found, fails startup with the side, interface and rule, as galactic-cni does. A ValidationError on a later re-resolution turns the readiness service NOT_SERVING until it clears; current attachments are kept.
    • galactic-nat: an uplink listed twice is rejected as sides_overlap (contract §1 rule 2).
    • Tests: a table over interface_not_found, vlan_id_out_of_range, vlan_protocol_unsupported, stacked_vlan and parent_type_unsupported for both components (fake netlink), readiness tests for re-resolution, and real-kernel root tests where the kernel can build the device.
  3. self-assigned this
    on Dec 1, 2026
  4. privateip commented on Dec 1, 2026

    @privateip
    ContributorAuthor

    Fixed by #1548, merged into the epic branch epic/1399-vlan-transport as c72a7e9. Unit tests and real-kernel root tests in CI cover it. The lab check (V17/V18) runs in #1405's smoke pass. Closed by hand because Fixes only fires when the epic branch merges into main.

  5. added a commit that references this issue on Dec 2, 2026
    30529fa
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