Skip to content

fix(cni): Report a node's own egress shard as local - #857

Merged
privateip merged 1 commit into
mainfrom
fix/egress-local-shard-not-unreachable
Oct 13, 2026
Merged

privateip merged 1 commit into
mainfrom
fix/egress-local-shard-not-unreachable

Conversation

@privateip

@privateip privateip commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #856.

galactic-cni now reports a node's own egress shard as local, not unreachable. Forwarding is unchanged, and the two pool alerts fire only on nodes with tenant routes on the shard group.

Testing

  • task lint, task build and task test:unit pass. New unit tests show a local shard is never resolved or alive and keeps its flag through Close, and an unresolvable remote shard is still unreachable.
  • promtool test rules passes. A shard node with no tenants fires nothing, a node with no tenants whose remote shard is unreachable fires nothing, and a node with tenants and an unreachable shard still fires.
  • On the staging lab, the edge node's own shard locator is a local discard route, so the route lookup fails. On production edge nodes, the other shard resolves and the node's own shard does not.
  • task test:e2e and task verify:nat-active-active were not run because this environment has no Docker.

The only datapath change is an unused #define, so task test:unit-root was not run.

Important

Infra keeps a central copy of these rules. datum-cloud/infra#6955 tracks installing them, with runbook entries, after this merges.

🤖 Generated with Claude Code

In hashed egress mode, galactic-cni on a node that runs an egress shard
reported that shard as unreachable in every class. The node originates
the shard's locator itself, so the SID never resolves over an uplink
there. With one shard in the cluster, every shard node matched
GalacticEgressPoolEmpty although it has no tenant to egress.

A shard whose spec.targetRef names the node is now a local group member.
Its SID is not resolved, it is never alive, and pool_members reports it
as state="local". The datapath is unchanged: a local shard was never
alive before either, and ordered mode skips it the same way, by failing
to resolve it.

GalacticEgressPoolEmpty and GalacticEgressPoolBelowMinimum now require
routes on the group (galactic_cni_egress_group_routes > 0), so a node
with nothing to egress does not page. GalacticEgressClassUnserved counts
a local shard as able to serve its class. A remote shard that does not
resolve is still unreachable and still fires on a node with tenants.

Key changes:
- ShardCandidate.Local and a member flag for it; Apply skips resolving
  a local shard, and Close and Members keep the flag
- egressShardCandidates marks the shard targeting this node as local
- pool_members{state="local"}; the unreachable warning skips it
- Alert rules scoped to nodes with group routes, with promtool cases for
  a shard node and a node whose only remote shard is unreachable
- verify:nat-active-active checks each lab shard node reports its own
  shard local and the other active

Fixes #856

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@privateip privateip changed the title fix(cni): Report a node's own egress shard as local, not unreachable fix(cni): Report a node's own egress shard as local Oct 13, 2026
@privateip
privateip force-pushed the fix/egress-local-shard-not-unreachable branch from 66e0d73 to c200b20 Compare October 13, 2026 16:07
@privateip
privateip marked this pull request as ready for review October 13, 2026 16:08
@privateip
privateip requested a review from a team as a code owner October 13, 2026 16:08
@privateip
privateip enabled auto-merge October 13, 2026 16:08
@privateip
privateip merged commit b915014 into main Oct 13, 2026
15 checks passed
@privateip
privateip deleted the fix/egress-local-shard-not-unreachable branch October 13, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

galactic-cni reports its own node's egress shard as unreachable

2 participants