Repository navigation
feat(agent): ghost-sweep prune circuit breaker + lost-ADD self-heal eviction (#566, #567) - #572
Merged
Merged
Conversation
…viction (#566, #567) Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EioJVuoepwStjHoRLB52WR
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EioJVuoepwStjHoRLB52WR
bpalermo
added a commit
that referenced
this pull request
Jul 20, 2026
…icy (#567 self-heal) (#575) #572 granted pods/eviction under apiGroups:["policy"], but the eviction subresource create is authorized under the CORE ("") group — so every ghost-sweep self-heal eviction silently 403'd ("cannot create resource pods/eviction"). Found via a node-reboot G1 validation: a rebooted node's prober pod lost its CNI ADD, the self-heal correctly tried to evict it to force re-ADD, and got a 403 — leaving the pod mesh-broken (5/s prober connection errors) until manually rolled. Claude-Session: https://claude.ai/code/session_01EioJVuoepwStjHoRLB52WR Co-authored-by: Claude Fable 5 <[email protected]>
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.
Summary
Hardens the CNI ghost sweep against the 2026-07-19 power-blip incident, where a transient fleet-wide netns-check failure made the prune classify every stored pod as a ghost and wipe persistent storage on all nodes — a total mesh egress outage with no self-recovery (container restarts never re-run CNI ADD).
Fixes #566 — prune circuit breaker (root cause).
Fixes #567 — self-heal lost-CNI-ADD pods.
Extends the small phase-helper structure introduced in #561.
#566 — prune circuit breaker
ghostNetnsFailThreshold = 3consecutive failed sweep passes. A passing check (or an API-confirmed-live pod) resets the per-container streak. Orphan pruning (K8s pod authoritatively gone) is not gated — the API is ground truth.Runningwith a live IP, it is not a ghost — skipped and logged. This vetoes the incident's exact false positive.pruneBreakerFraction = 0.30of stored pods and more thanpruneBreakerMinPods = 2absolute is refused wholesale — logged at ERROR with the would-be count and aprune_breaker_trippedmetric. Every pod is kept. Manual recovery is unaffected: truly-gone pods are gone from the API too, which the orphan cross-check prunes once the correlated failure clears.#567 — lost-ADD self-heal
policy/v1, PDB-respecting) afterlostAddEvictThreshold = 3consecutive detections, forcing sandbox recreation and a fresh CNI ADD.lostAddEvictPerPass = 2evictions per sweep per node. Emits aAetherCNIAddLostWarning Event on the pod + log +lost_add_evictionsmetric. Streaks reset when the pod registers or disappears.policy/pods/evictioncreate andeventscreate. Chart base version bumped0.78.0 → 0.79.0.Incident replay under the new logic
Runningwith its IP.Tests
Table-driven, using the package's existing fakes: hysteresis (below-threshold kept, threshold prunes, passing-check reset), API-cross-check veto, mass-breaker trip + metric + eviction interlock, eviction after M sweeps, per-pass rate limit, streak reset on recovery. Existing
TestSweepPrunesStalePodsadapted to drive past the hysteresis threshold (intent preserved). Full//agent/...suite green (non-race;TestHandlePodTerminatingPoolClosePhaseis the known #554 -race flake, untouched).🤖 Generated with Claude Code
https://claude.ai/code/session_01EioJVuoepwStjHoRLB52WR