Skip to content

fix(agent,edge): designed startup retries log at WARN, and name who owns the recovery (#766) - #807

Merged
bpalermo merged 4 commits into
mainfrom
fix/designed-retry-log-levels
Sep 19, 2026
Merged

bpalermo merged 4 commits into
mainfrom
fix/designed-retry-log-levels

Conversation

@bpalermo

Copy link
Copy Markdown
Owner

Fixes #766.

Three sites logged ERROR for a retry that is expected to fail once and heals by
itself, so "zero ERROR lines" stopped being a usable bar for deploy and soak
grading. Each keeps ERROR for the case where the excuse no longer holds.

  • xDS initial snapshot (the edge): the edge does not hold its first snapshot for
    identity, so with no SVID yet it cannot handshake with the registrar, exhausts
    the 15s budget and starts local-only — at ERROR, on every healthy roll. It now
    gets a severity-only view of its identity (SetIdentityWatch): WARN while the
    SVID is pending, and the background retry escalates to ERROR once if identity
    arrives and three more loads still fail. With the SVID in hand the ERROR is
    unchanged. The node agent is unaffected (it holds for identity first).
  • Broker subscribe (the agent): Unavailable is WARN until the subscription has
    been failing for 2 minutes (the readiness dwell), then ERROR. A restarted agent
    resubscribes before its own SVID has landed, and a SPIRE agent restart removes
    the socket for ~35s: both cost one ERROR per managed pod per attempt and healed
    in seconds at zero prober cost.
  • Pod termination (the agent): the failed DRAINING mark has a fallback and is
    WARN. The fallback failing too stays ERROR — a terminating pod remains
    selectable — unless this agent's SVID is pending, when no registry call could
    have succeeded. The message said "CNI DEL will retry"; since fix(cni,agent): CNI DEL no longer blocks on the agent; stale-netns pods kept out of every snapshot (#796) #798 a DEL does not
    retry against an agent that is down, so it now names the real owners: the pod's
    CNI DEL or the next ghost sweep.

Tests: local_only_severity_test.go (WARN while pending, single escalation after identity, ERROR unchanged otherwise), bridge_unreachable_severity_test.go (WARN→ERROR ladder), TestHandlePodTerminatingFallbackSeverity. No chart change.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

bpalermo and others added 3 commits September 19, 2026 09:36
…wns the recovery (#766)

Three sites logged ERROR for a retry that is expected to fail once and heals by
itself, so "zero ERROR lines" stopped being a usable bar for deploy and soak
grading. Each keeps ERROR for the case where the excuse no longer holds.

- xDS initial snapshot (the edge): the edge does not hold its first snapshot for
  identity, so with no SVID yet it cannot handshake with the registrar, exhausts
  the 15s budget and starts local-only — at ERROR, on every healthy roll. It now
  gets a severity-only view of its identity (SetIdentityWatch): WARN while the
  SVID is pending, and the background retry escalates to ERROR once if identity
  arrives and three more loads still fail. With the SVID in hand the ERROR is
  unchanged. The node agent is unaffected (it holds for identity first).
- Broker subscribe (the agent): Unavailable is WARN until the subscription has
  been failing for 2 minutes (the readiness dwell), then ERROR. A restarted agent
  resubscribes before its own SVID has landed, and a SPIRE agent restart removes
  the socket for ~35s: both cost one ERROR per managed pod per attempt and healed
  in seconds at zero prober cost.
- Pod termination (the agent): the failed DRAINING mark has a fallback and is
  WARN. The fallback failing too stays ERROR — a terminating pod remains
  selectable — unless this agent's SVID is pending, when no registry call could
  have succeeded. The message said "CNI DEL will retry"; since #798 a DEL does not
  retry against an agent that is down, so it now names the real owners: the pod's
  CNI DEL or the next ghost sweep.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
… ladder owns escalation (#766)

Seen on the GitOps #77 phase-2 spire-agent roll (2026-09-19 12:03-12:06Z): 39
ERROR lines, one per managed pod, next to the 117 Unavailable ones the previous
commit already demotes. Resubscribe was 17.2-17.8s per node at zero prober cost.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
…nit)

CI's cognitive-complexity lint rejected retryInitialRegistryLoad and
handlePodTerminating after the previous commits; behaviour unchanged.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
@bpalermo
bpalermo force-pushed the fix/designed-retry-log-levels branch from c0e2827 to 7b282e9 Compare September 19, 2026 12:37
@bpalermo
bpalermo merged commit 896a0d2 into main Sep 19, 2026
20 checks passed
@bpalermo
bpalermo deleted the fix/designed-retry-log-levels branch September 19, 2026 12:44
bpalermo added a commit that referenced this pull request Sep 19, 2026
…I DEL, quiet leader-election shutdown, 036 outcome (#799) (#810)

- docs(runbook, soak README): `svid_updates{update="rotated"}` means the
  certificate changed, not that the TTL ran down. A restarted SPIRE agent re-mints
  every SVID on its node, so a spire-agent restart moves `rotated` by the node's
  pod count and leaves `unchanged` at zero (measured on rev219: 0 -> 7 pods, 0 -> 1
  node). The text added in #806 said otherwise. Rotation cadence has to exclude
  the minutes in which that node's spire-agent restarted.
- agent: RemovePod logs `pod removed: CNI DEL served` (pod, namespace, netns,
  containerID) at INFO. A successful DEL used to leave only two anonymous
  "setting snapshot" DEBUG lines, so "a late DEL cleaned this pod up" could not be
  told from "the ghost sweep pruned it" without reading snapshot timestamps.
- common/manager: controller-runtime's "error received after stop sequence was
  engaged" carrying "leader election lost" is demoted to INFO ("leader election
  released on shutdown"). Every leader-elected component logs it on a clean
  SIGTERM — the manager cancels the election context itself — and it was the last
  ERROR line on a healthy roll after #807. Exactly that record only: any other
  error after the stop sequence, and a lost lease outside shutdown, stay ERROR.
- docs(proposals/036): status and a second Outcome section — the 8-hour soak
  (4 rotation cycles, a signing-CA rotation, zero identity errors), phase 2 done,
  #804/#805, #806, #807, what is still open (phase 3, the selector gain).


Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

Co-authored-by: Claude Fable 5.1 <[email protected]>
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.

edge: 'registry unavailable for initial snapshot' logs at ERROR on the designed #740 startup retry

1 participant