Repository navigation
Conversation
Worker resolved destinations on this node to Local but had no module to program them, so every local.* capability reported ModuleNotRunning. Add the Local module (internal/worker/local) and register it next to Fabric. - Programs: local_rx delivers a public packet a dispatcher slot marks with galactic_local_meta to the TAP it names; local_link_rx returns a local.tap reply out of the device the flow arrived on, or sends a flow into the VPC's service-internal veth pair; local_pair_rx delivers the pair's return; local_link_guard drops a routed link source the link was not given. Each decides the receiver's policy on its own path and sets the decided mark; an unauthorized target is dropped, as are IPv6 fragments and packets above the target's MTU. - Lifecycle: tc filters sit after galactic-cni's under its interface lock. The module creates and deletes the pairs and routed links it owns, keeps CNI's interfaces, and reprograms after an ifindex change. A routed link's pod end goes only into the owner's authenticated pod. - Readiness checks the hooks, a live public dispatcher slot, native XDP on the NAT end, interface kind, carrier, MTU and failed neighbors, forward and return separately. - Uplink discovery skips every link Galactic creates per VPC. - API: ClaimStatus gains handoff_interfaces; claims record the owner's pod, which a duplicate Request from a new pod updates. Privileged tests cover every entry path (plain, VLAN and bond, native and generic XDP), policy denials, untrusted entry, hook removal and repair, a cold neighbor, ifindex replacement, partial checksums, routed links and withdrawal.
Record how the Local module implements the handoffs the contract specifies: its programs and hooks, link and filter ownership, readiness checks and reasons, trust of public ingress, the handoff_interfaces status field, and which writer steers public flows into a handoff. The ownership inventory names the Local module as the sole mutator of its tc filters, its handoff links and its maps. D28 records the accepted decisions; D29 proposes routed-link addressing by the claim attachment's addresses and resolver-written steering entries.
worker-claim requests, observes and releases one claim from inside a lab pod, as a service agent would, so the lab can check Local and Fabric programming end to end. worker-fabric.sh now takes the allowlist from WORKER_ALLOWLIST, so a run can grant a lab pod its capabilities.
- Bring a routed link's host end up only after its guard row and filter are in place, and take it down whenever the guard is missing, so a pod never reaches the VPC unguarded. - Mark every new Local link right after creating it and remove the link when a later step fails; treat an unmarked link with a Local name as Local's to replace, so an interrupted creation does not block a claim. - Record a routed link's failure on its own claim and keep programming the rest of the VPC. - Keep local_rx on the receiving devices while any TAP is authorized, so a restarted Worker planning a scope without local.tap first does not detach it. - Admit a link-local source on a routed link only toward a link-local or multicast destination, and the unspecified source only for ICMPv6. - Drop IPv6 fragments behind extension headers, and check the egress MTU on the reply and NAT redirects. - Report claims whose link names collide instead of overwriting one. - Pick a pod's lowest PID when opening its network namespace.
Collaborator
Author
Test evidence at 0de62b6The privileged tests are in
Also covered: a guest's partial checksum through the pair ( Repository checks:
|
A routed_link or socket claim's link reaches one pod. A duplicate Request from another pod of the owner used to move the link, so two pods holding one claim would move it back and forth on every call. Worker now refuses a call on such a claim from another pod with FAILED_PRECONDITION and reason ClaimHeldByAnotherPod while the pod the link serves still runs, and changes nothing. Once that pod is gone, the call moves the link to the calling pod, as after a pod replacement. Claims whose handoff serves no pod never record a move. Worker learns whether a pod runs from the host's /proc, by the same cgroup check the API's peer check uses.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Worker sorts each destination on this node into Local delivery, but nothing programmed Local delivery, so every Local capability reported that no module was running. This change adds Worker's Local delivery module, which programs the three same-host handoffs the contract specifies and #1444 proved in the lab.
What changes:
Each handoff decides the guest's policy on its own path and drops anything no claim authorizes. Readiness reports the forward and return paths separately, with a reason for each, and a missing hook withdraws only the direction it carries. Uplink discovery now skips every link Galactic creates for a VPC, so a NAT pair's end can never become an uplink.
Local's programs run after galactic-cni's on shared interfaces and never replace them. Local deletes only the links, programs and routing entries it created. The contract and ownership docs record this. The issue's comments explain two departures from the plan: routed-link addressing, and who steers public traffic into a handoff.
Privileged tests cover every acceptance item on a real kernel, as the comment below lists. The lab run is pending. It checks Local claims on one compute node in two VPCs that share guest addresses. One claim with both a Local and a Fabric destination cannot be shown in the lab: each lab site is its own cluster, so a node's Worker cannot see another site's attachments.
Fixes #1435