Skip to content

agent-down + conflist strip = silently unmeshed pods: the gauge goes absent (not 0) and the taint gate doesn't check chaining #667

Closed

Description

@bpalermo

Summary

The conflist re-assert loop (#650) heals the common case in ~2.5s, but it has one hole it cannot close by design: if the agent is not running when a competing writer strips the entry, nothing repairs it — and nothing alerts.

Sequence: agent down (crashloop, image-pull failure, node NotReady, or simply mid-restart) → a flannel pod is recreated and its init container cp -fs its template over 10-flannel.conflist, removing aether-cni → the entry is gone → CNI ADDs no longer reach the agent → new pods on that node come up successfully and unmeshed, silently.

Two independent gaps make this invisible:

1. The alert cannot fire. aether_agent_cni_conflist_chained is emitted by the agent. With the agent down the series goes absent, not 0, so an alert written as == 0 never matches. The GitOps rule needs == 0 or absent(...), or to be paired with an agent-up condition.

2. The node keeps accepting pods. cniServing() in agent/internal/node/taint.go is a bare os.Stat on the agent socket — it has no notion of "aether is actually chained in the active conflist". So the startup taint (#569 / proposal 033) is removed, or stays removed, on a node that cannot mesh anything.

The Reasserter already detects the unrepairable cases — no base plugin present, or no known-good entry ever observed (agent/internal/cniconflist/reassert.go) — but that state is not published anywhere that changes node behaviour.

Why this matters more than it looks

This is the 2026-08-29 failure mode (a ~2h fleet-wide mesh outage, #645) reduced to a single node and made silent. #650 removed the fleet-wide version; what remains is the version nobody notices. A pod that comes up unmeshed is not obviously broken — it has working base networking, so it serves traffic outside the mesh with no mTLS, no policy, and no telemetry, which is a security-relevant failure presenting as "everything looks fine".

Proposed fix

  1. Publish the unrepairable state from the Reasserter and have cniServing() (or a sibling readiness notion) require socket serving AND aether chained in the active conflist before the node-ready taint is removed. A node that cannot be repaired then stops accepting new pods instead of quietly accepting unmeshed ones — failing closed at the scheduler rather than open at the data plane.
  2. Fix the alert in bpalermo/k8s-talos-main so absence is treated as a fault: max by (node) (aether_agent_cni_conflist_chained) == 0 or absent(aether_agent_cni_conflist_chained). Note this interacts with the same repo's kube_state_metrics-free environment — there is no up series for the agent, so absence really is the only signal.

(1) is the substantive change; (2) is a one-line GitOps edit that should land first because it is free.

Acceptance

  • With the agent stopped and the entry stripped, the node stops accepting new pods (taint applied) rather than scheduling unmeshed ones.
  • An alert fires when the gauge is absent as well as when it is zero.
  • The existing ~2.5s repair path is unchanged when the agent is running.

Found while planning the remaining structural work on #645. Related: #650 (the repair loop), #641 (self-heal eviction, which correctly composes with #650 today), #569 / proposal 033 (taint lifecycle).

Activity

  1. bpalermo commented on Sep 5, 2026

    @bpalermo
    OwnerAuthor

    Production validation — 8h soak 2026-09-05, rev192 / chart 0.92.0 / a3cde6c

    Auto-closed by its PR merge on 2026-09-04T21:45Z, before deploy. This was the blast-radius item of the release — the failure mode being guarded against was a false positive tainting a worker NoSchedule ~4 min after any roll — so the production evidence matters more here than anywhere else.

    No false positive, across 31 rolls in 8h.

    • Worker taints checked at every fire point and at grade: [] on all five workers at T0 (01:07Z), 03:32Z, 05:59Z, 06:22Z and 09:06Z. kubectl get nodes -o custom-columns=...spec.taints at grade shows <none> for main-worker-01..05 (only main-cp-01 carries the control-plane taint).
    • kubectl get events -A --field-selector reason=TaintManagerEviction → No resources found.
    • The hardest case passed: the 06:05:51Z TRIPLE (concurrent aether-agent + aether-proxy + svc-3 roll) produced no taint, and agent start→Ready stayed 17–20s on every node with no readyz delay.

    The chain never broke. min_over_time(aether_agent_cni_conflist_chained[8h]) = 1 on all five nodes — the gauge never went to 0 and never went absent, which is the specific regression this issue named. aether_agent_cni_conflist_reasserts_total has no series at all over the run (a metric inventory query over aether_agent_cni_conflist.* returns only _chained), i.e. the repair path was never needed.

    The ghost-sweep eviction interlock never engaged. max_over_time(aether_agent_ghost_sweep_unmeshed_pods[8h]) = 0 and max_over_time(aether_agent_ghost_sweep_prune_breaker_engaged[8h]) = 0 on all five nodes; ghost_sweep_lost_add_evictions and ghost_sweep_stale_running_evictions have no series.

    Metric-name note for future graders: these are aether_agent_ghost_sweep_unmeshed_pods / aether_agent_ghost_sweep_prune_breaker_engaged. Querying them as aether_agent_unmeshed_pods / aether_agent_prune_breaker_engaged returns empty and reads as a clean zero when it is really a false zero — I hit exactly that before control-testing the names.

    Agents stayed healthy. 0 restarts on all five aether-agent pods, Ready throughout, 2 agent rolls in the window.

    Cost is free. Profiling 07:08:30–07:33:30Z: ReadyChecker, ChainStatus, Reasserter.check and Reasserter.repair are all absent below 0.127% of agent CPU (<0.05 core-s).

    Verdict: holds in production, including the false-positive case it was most at risk of. Staying closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions