Repository navigation
Description
Parent: Deliver Galactic Worker with Local and Fabric delivery for tenant services
Deliverable
One authoritative host mapping per physical router identity and VPC, shared by guest (CNI) and service attachments and owned by Worker. It satisfies the "CNI and service reconcilers converge on one VRF" part of the "Implement common foundation" phase exit.
Current writers to fold in:
internal/nodevpc(Ensure,ClaimArgument) andinternal/plumbing/vrf(EnsureAndEnslave,Locked,DeleteIfUnused).internal/plumbing/ebpf/attachreg(RegisterDatapath,RegisterHostLink,UnregisterInterface).- The sidecar host-return writer in
internal/installer/sidecarreturn.goandsidecarreap.go.
The CNI entry points are the RunPlugin functions in internal/{cnitap,cnibgp,cniroute}, which handle ADD, CHECK, DEL and STATUS. The TAP lifecycle is in internal/cni/tap/tap.go and host gateway setup in internal/hostgw. CNI has no GC verb. Garbage collection runs in galactic-router through internal/gc.RunGC.
Work items
- Reconcile CNI argument claims and attach registration with the sidecar host-return writers under Worker ownership. Key by physical router identity and VPC. Retain references for live TAPs and service attachments. Define conflict handling for node tables that are already populated.
- Integrate ADD, CHECK, DEL, STATUS and
internal/gcrepair. Preserve runtime ownership of TAPs, tenant policy and host-only ports. Read the current ifindex and guest neighbor at delivery time. Support legacy node state and idempotent adoption. - Keep workload attach working when the Worker service API is unavailable, as Define the Worker API, authority model and integration branch #1431 specifies.
Dependencies
Blocked by #1431 (ownership table) and #1433 (Worker reconciliation).
Acceptance
Privileged tests run under task test:unit-root (requireRoot(t)) and interleave CNI and sidecar reconciles for two VPCs with the same guest IP. After each of the following steps the tests verify the correct table, route, SID and live socket:
- Replace one TAP.
- Remove the last TAP while an Envoy attachment holds a reference.
- Restart Worker.
- Replay a stale DEL.
Further checks:
- A workload attach with the Worker API down succeeds and converges once Worker returns.
- Adopting legacy node state from the baseline leaves existing routes and maps unchanged.
- The delivering PR targets
integration/galactic-worker, carries this evidence and saysFixes datum-cloud/galactic#1434. GitHub does not auto-close from a non-default base, so close this issue explicitly when the PR merges and record the PR and merged SHA.
Activity
privateip commentedon Nov 18, 2026
Triage: valid, checked against
integration/galactic-workerat 1441530.internal/worker/reconcile.go,Reconcile). It has no host-scope stage for the VRF, table, Argument,vrf_tableor references, and it does not adopt scopes that already exist on the host.ownershipfence:vrf.EnsureAndEnslaveininternal/cnitap/ops_add.goandinternal/cni/ops_add.go;claimArgument,registerEBPFDatapathand the BGPAdvertisement writes ininternal/cnibgp/bgp.go. The same holds for the installer'sSweepEBPFVRFTablepass, the sidecar return and reap writers, and routerRunGC.internal/cnitap/ops_del.go) removes the host interface's ifindex-keyed map rows and radv record by interface name beforetap.Deletechecks the owner stamp. A replayed DEL from a predecessor container therefore strips the replacement TAP's rows. The veth DEL path checks ownership first. Acceptance step 4 (stale DEL) would fail today.privateip commentedon Nov 18, 2026
Approved plan.
Ownership
vrf_table, per-VPC routes, and GC of those.ExclusiveonVPCScope(vpc)and never calls Worker:vrf.EnsureAndEnslavevrf_tablesweep, and sidecar return and reapWorker
nodevpc.Ensureand keeps a reference set per VPC: enslaved links, Worker claims, edge users, and advertisements with live containers.vrf_table. It claims or takes over each scope with a snapshot commit, which writes nothing when the host state is consistent.GC (two-step transfer)
RunGCand the installer sweep skip VPCs whose fence owner is a Worker incarnation. For other VPCs they delete underExclusive.Fence
internal/edge/ownershipmoves tointernal/ownership.DefaultDiris unchanged.TakeoverreplacesFencefollowed byAdopt, so a Worker crash cannot leave a scope transitioning and block CNI ADD while Worker is down. It is recorded as a new decision indocs/worker.Stale DEL
Out of scope here
egress_route_tablewriters (Implement Fabric delivery through existing SRv6 and routing contracts #1436).Tests (
task test:unit-root)socketclaim interleaved.task ciruns as well.privateip commentedon Nov 19, 2026
Delivered by #1447, merged into
integration/galactic-workeras a639f63. The acceptance evidence is on the PR, and the privileged root tests pass in CI on the merged head. GitHub does not close issues automatically from a non-default base, so this closes by hand per #1430.