You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Gateway and NAT stay Ready when a transport selection fails validation #1546
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
Unit or root tests for both components show each rule above produces a startup failure or not-ready, with a log line naming the rule.
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.
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.
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.
Activity
privateip commentedon Dec 1, 2026
Confirmed on
epic/1399-vlan-transport(a526d86):syncVLANEgressincmd/galactic-gateway/gateway.goandcmd/galactic-nat/nat.gopasses atransport.ValidationErrortoTracker.Fail, which only logs and counts it. A missing interface fails earlier, inedgeattach.ResolveTargets/natattach.ResolveUplinks, before any transport resolution runs, so no rule is named.Plan (one PR with #1547):
internal/plumbing/transport: addTracker.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-gatewayandgalactic-nat: resolve the configured logical interfaces through the transport contract before the hook targets are expanded or the XDP mode is selected. AValidationErrorat startup, includinginterface_not_found, fails startup with the side, interface and rule, asgalactic-cnidoes. AValidationErroron 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 assides_overlap(contract §1 rule 2).interface_not_found,vlan_id_out_of_range,vlan_protocol_unsupported,stacked_vlanandparent_type_unsupportedfor both components (fake netlink), readiness tests for re-resolution, and real-kernel root tests where the kernel can build the device.privateip commentedon Dec 1, 2026
Fixed by #1548, merged into the epic branch
epic/1399-vlan-transportas 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 becauseFixesonly fires when the epic branch merges intomain.fix(transport): Refuse invalid sides in the gateway and NAT