Skip to content

Failure-Mode Runbooks

Recurring, named failure modes and their recovery procedures. These are cluster-generic runbooks — independent of any single application — for the handful of issues that have bitten this cluster more than once. Each entry follows the same shape: Symptom → How to confirm → Root cause → Recovery (and Prevention where it applies).

Salvaged 2026-09-19 from the retired HomeAIOps DoD doc, which was otherwise historical. The langgraph-specific "local inference path down" escalation runbook was dropped with that pipeline; the four below are still current.

ExternalSecret-extract field present but empty

Symptom. A Secret populated by an ExternalSecret is missing the value an app needs. kubectl get secret … -o yaml shows the key exists; ... | base64 -d | wc -c returns 0 or 1 bytes. The ExternalSecret itself reports SecretSynced cleanly — there is no operator-level error.

How to confirm.

LEN=$(kubectl get secret -n <ns> <secret> \
  -o jsonpath='{.data.<KEY>}' | base64 -d | wc -c)
echo "decoded length: $LEN bytes"
kubectl get externalsecret -n <ns> <name> \
  -o jsonpath='{.status.conditions[?(@.type=="Ready")]}'

If the decoded length is 0–1 bytes and the ExternalSecret is Ready=True, the 1P field exists but is blank.

Root cause. The 1P item has a placeholder field with the right name but no value behind it. external-secrets-operator copies the empty string into the target Secret — it can't tell the difference between "deliberately empty" and "operator forgot to paste the value."

Recovery. Two paths:

  1. Fill the empty 1P field. Open the 1P item, paste the value, force-sync:
kubectl annotate externalsecret -n <ns> <name> \
  force-sync=$(date +%s) --overwrite
  1. Point at the field the secret already lives under. If the value is already in a different 1P item under a different field name (e.g. an empty ANTHROPIC_API_KEY here while the live value is in another item's anthropic_api_key), re-wire the ExternalSecret's dataFrom + template to pull the live field. Single rotation surface beats duplicate copies. The canonical example for this repo is the langgraph Anthropic key fix in #11923.

Prevention. When adding a new ExternalSecret template variable that maps from a 1P field, verify the field is non- empty before merging. A wc -c check is enough.

Stuck CSI RBD unmap (Ceph PG ghost-stuck)

Symptom. Pod with a ceph-block PVC stuck ContainerCreating for minutes with events:

FailedMount  MountVolume.MountDevice failed: rpc error: code = Aborted
desc = an operation with the given Volume ID … already exists

Or, on the originating node, rbd unmap /dev/rbdN fails with exit status 16 (EBUSY) despite no userland processes holding the device (verified via /proc/[0-9]*/maps, /proc/[0-9]*/fd, and /sys/block/rbdN/holders/ all empty).

ceph -s may report a stale SLOW_OPS aggregate, but per-OSD dump_blocked_ops (both via admin socket and via mon-routed ceph tell osd.X) shows zero blocked ops. The aggregate is the mgr's cached-but-not-decremented count from a prior real event — misleading.

Underlying issue. A specific PG owning the rbd_header object is "ghost-stuck": it can't be queried (ceph pg N.M query times out), it's not in pg dump_stuck, but raw rados stat rbd_header.<id> against it hangs. The OSD primary has cleared its blocked-ops queue but the PG's per-object lock or watcher state is wedged.

How to confirm.

# 1. From a mon pod, with the embedded keyring:
MON=$(kubectl get pod -n rook-ceph -l app=rook-ceph-mon -o name | head -1)
ARGS='--conf /etc/ceph/ceph.conf
      --keyring /etc/ceph/keyring-store/keyring
      -m "[v2:<mon-ip>:3300,v1:<mon-ip>:6789]"'   # adjust to your mons

# 2. Identify the image_id from the affected node's kernel state:
kubectl debug node/<node> -it=false --image=busybox:1.36 -- \
  cat /host/sys/bus/rbd/devices/<N>/image_id
# → e.g. 0e6ed03d95369c

# 3. Find the PG that owns the header:
kubectl exec -n rook-ceph "$MON" -c mon -- bash -c "
  ceph $ARGS osd map ceph-blockpool rbd_header.<image_id>
"
# → 'pg P.Q -> up [primary, ...] acting [primary, ...]'

# 4. Confirm the PG itself is unresponsive:
kubectl exec -n rook-ceph "$MON" -c mon -- bash -c "
  timeout 15 ceph $ARGS pg P.Q query
"
# → exit 124 (timeout) is the signature

# 5. Confirm OSDs say they're idle (rules out a real slow op):
kubectl exec -n rook-ceph "$MON" -c mon -- bash -c "
  ceph $ARGS tell osd.<primary> dump_blocked_ops
"
# → empty / {ops: []}

# 6. Confirm raw RADOS read of the object also hangs:
kubectl exec -n rook-ceph "$MON" -c mon -- bash -c "
  timeout 15 rados $ARGS -p ceph-blockpool stat rbd_header.<image_id>
"

Recovery — propose-then-execute. Three options, least-invasive first:

  1. Targeted blocklist of the watcher client — works if the watcher is on a distinct krbd nonce. Pull client_addr from /sys/bus/rbd/devices/N/client_addr on the originating node, confirm it's not shared with healthy rbd mappings on the same node, then:
ceph $ARGS osd blocklist add <addr>/<nonce> 3600

Retry rbd unmap from the node — should release within seconds.

  1. Force PG re-peering via ceph osd down <primary> — when blocklist doesn't help (PG state itself is stuck, not just a client lease). Marking the primary down triggers re-peering via the replica OSDs; the daemon self-restarts under Rook within ~30s; PGs primaried elsewhere are unaffected. The acting set must have at least min_size replicas remaining alive for safety (verify with ceph osd tree).

  2. Decouple via PVC delete-and-recreate (regenerable data only) — for caches like ZOT where the data is rebuildable from upstream sources:

  3. kubectl scale statefulset/<app> --replicas=0

  4. kubectl delete pvc <pvc-name> (reclaim policy Delete on the storage class will GC the underlying RBD image)
  5. kubectl scale statefulset/<app> --replicas=1

This recovers the workload independently of the Ceph fix. The underlying PG-ghost-stuck issue remains and needs option 1 or 2 separately.

Prevention. The class of error appears tied to a prior cluster-network event (worker3 + worker7 network degradation on 2026-05-20) that left rbd watchers in a broken state on the affected nodes. Stabilizing node-level network reliability is the long-term fix. Until then, document the rbd-device-to-image mapping so the identification step (3) is faster.

Operational follow-up. This cluster has no rook-ceph-tools pod deployed (operator/helmrelease.yaml lacks toolbox.enabled: true). All ceph CLI work has to go through a mon pod with explicit --conf / --keyring / -m flags as in step 1. Adding the toolbox to the rook-ceph operator helmrelease is a quality-of-life follow-up; the 2026-05-21 incident showed the time cost of working without it.

ZOT cold-start recovery — the secondary failure mode

This runbook section pairs with the one above. When the underlying Ceph PG issue clears, ZOT itself doesn't immediately recover — it goes through a long cold-start sequence that can look like a fresh failure.

Symptom. After the Ceph PG re-peer succeeds (osd.2 came back up, rbd info works again from a mon pod), zot-0 enters a CrashLoopBackOff pattern even though the underlying volume is healthy. Each restart shows parsing next repo log lines walking through hundreds of cached images, but the pod gets killed by its liveness probe before reaching the end.

kubectl logs -n kube-system zot-0 --tail=5 | grep parsing
# → "parsing next repo 'quay.io/...': total=272, progress=233"
# Restart count climbs by 1 every ~30 s.

After this clears (post-parse + scrub + GC + retention all run on first boot), the pod becomes Ready but serves chart manifests with 5-minute latency for the next 30–60 min while background ops still contend for I/O.

How to confirm — phase 1 (parse loop).

kubectl get pod -n kube-system zot-0
# RESTARTS climbing by 1/30s — fingerprint
kubectl logs -n kube-system zot-0 --previous --tail=10 | grep -c "parsing next repo"
# → many; the parse never completes inside the liveness window
kubectl get pod -n kube-system zot-0 -o jsonpath='{.spec.containers[0].livenessProbe}'
# → check failureThreshold; default is 3 × 10s = 30 s — too short

How to confirm — phase 2 (post-parse latency).

ZOT pod is Ready=True, but helm template against ZOT-mirrored charts times out from CI:

kubectl logs -n kube-system zot-0 --tail=20 | grep '"latency"'
# Each manifest GET reports `"latency":"5m2s"` (or similar) —
# fingerprint of disk contention from scrub + gc + retention
kubectl logs -n kube-system zot-0 --tail=20 | grep -E "scrub|garbage collected|retention"
# All three running concurrently on cold-start

Root cause. ZOT v2 runs three periodic maintenance ops:

  • Scrub — manifest/blob integrity check
  • GC — remove unreferenced blobs
  • Retention — delete tags per retention policy

On a cold restart these all fire at once. With a 500 GiB ceph-block PVC and 272 cached repos, the first pass dominates disk I/O and serving threads starve. Steady-state runs touch only the small delta since the last run and are fast.

Recovery — phase 1 (parse loop).

Patch the liveness probe in-cluster to survive cold start:

kubectl patch statefulset -n kube-system zot --type=json -p='[
  {"op":"replace",
   "path":"/spec/template/spec/containers/0/livenessProbe/failureThreshold",
   "value":60}
]'

This bumps failureThreshold from 3 to 60 (10 min). The StatefulSet rolls a new pod; if Flux subsequently reconciles the HelmRelease, the patch is overwritten — see prevention below.

Recovery — phase 2 (post-parse latency).

Wait it out. Background ops settle in 30–60 min. CI can be unblocked by admin-bypass merging PRs whose CI failures are specifically Extract images / Flux Local Test chart-fetch timeouts against ZOT — the failures are pure infrastructure flake, not PR content.

Prevention. The in-cluster patch in "Recovery phase 1" is a hotfix. The durable fix is in Git:

  1. (Applied 2026-11-18.) A startupProbe on the ZOT HelmRelease in kubernetes/apps/kube-system/zot/app/helmrelease.yaml keeps liveness/readiness from applying until startup completes:
probes:
  startup:
    enabled: true
    custom: true
    spec:
      httpGet:
        path: /v2/
        port: 5000
      initialDelaySeconds: 30
      periodSeconds: 30
      failureThreshold: 60   # 30 min cold-start budget
  1. (Optional) Configure ZOT's extensions.scrub.delay, extensions.gc.delay, and retention.schedule so the first post-restart pass doesn't fire immediately. See ZOT v2 config docs.

  2. Open a workaround: issue per .agents/instructions/workarounds.md linking back to this runbook section so the in-cluster patch isn't quietly lost on the next HelmRelease reconcile.

Cross-reference. The user-visible symptom that first exposes this on a busy cluster is "Django ADMINS email about postgres connection errors" — the postgres-zulip primary takes a brief connection flap during PG re-peering, Django's ADMINS hook fires. The Postgres process itself doesn't restart; reconnect is automatic; data is intact. See the 2026-05-21 incident notes for the exact timing.

ZOT scrub saturating a node NIC — cluster-wide stall

Symptom. For ~35 min at a time (one night apart, start time drifting ~20 min/day), several things fail at once: Ceph HEALTH_WARN with slow ops, apiserver / controller-manager / scheduler / kube-vip restarts on one master, cluster-DNS lookup timeouts in CronJobs, MCP conformance timeouts. HostNetworkReceiveSaturated and CephRbdDeviceSaturated fire for the same node.

Root cause. ZOT's scrub extension verifies every cached image: for each manifest it re-reads every referenced blob and checks it against its digest. That is a full read of the 500Gi zot-data-ceph RBD volume. Its interval timer restarts after each run (and on every pod restart), so the start time drifts. When zot ran on master1, the read (~120 MB/s) saturated master1's single 1GbE NIC, which also carries osd.1, a mon, other RBD clients and the control plane (2026-11-18).

How to confirm.

kubectl logs -n kube-system zot-0 | grep -m1 'executing scrub'
# start timestamp lines up with the stall
kubectl get pod -n kube-system zot-0 -o wide   # which node?

Prevention (in Git). zot is kept off control-plane nodes, preferring the beast-hosted workers (10GbE uplink), and the scrub interval is 168h. Any restart still triggers one immediate scrub, so expect one heavy read pass after each rollout.

Stalled HelmRelease with MissingRollbackTarget

Symptom. A HelmRelease shows Ready=False with condition Stalled / MissingRollbackTarget: "Failed to perform remediation: missing target release for rollback: cannot remediate failed release." helm history -n <ns> <release> shows every release in failed state — there is no successful version to roll back to. Underlying resources (Deployment, Service, etc.) may nevertheless be live and serving traffic.

How to confirm.

kubectl get helmrelease -n <ns> <name> -o json \
  | jq '.status.conditions[] | select(.type=="Stalled")'
helm history <release> -n <ns>

If all release versions are failed and the underlying Deployment is Available, the chart's resources have converged despite Helm's history saying otherwise — Helm's wait/timeout fired before the pod became Ready.

Root cause. The HelmRelease's effective install/upgrade timeout (spec.timeout, default 5 m) is shorter than the time the first Deployment took to become Ready. Common drivers: Istio sidecar warmup, slow image pull on first install, slow ExternalSecret resolution. Once the first install fails, Flux attempts retries; each retry also times out, and after the configured retries count the release is Stalled with no healthy version to remediate to.

Prevention. Set spec.timeout on the HelmRelease to cover the slowest-realistic warmup for the workload (15 m is a safe default for Istio-injected pods). See kubernetes/apps/mcp-system/windmill-mcp/app/helmrelease.yaml for the canonical example.

Recovery. Destructive — propose to operator before running. The Deployment and friends already exist; we need to make Helm's storage agree.

  1. Suspend Flux reconciliation so it doesn't fight the cleanup:
flux suspend hr <name> -n <ns>
  1. Verify the underlying Deployment is healthy:
kubectl get deploy,svc,sa,httproute -n <ns> \
  -l app.kubernetes.io/instance=<name>
  1. Delete the chart resources and the failed Helm history secrets together — Helm won't adopt resources it doesn't own, so a brief downtime is unavoidable:
kubectl delete deployment,svc,sa,httproute \
  -n <ns> -l app.kubernetes.io/instance=<name>
kubectl delete secret -n <ns> -l owner=helm,name=<name>
  1. Resume Flux and force reconcile; the HR will do a clean helm install:
flux resume hr <name> -n <ns>
flux reconcile hr <name> -n <ns> --force
  1. Verify the HR becomes Ready=True within the new spec.timeout window:
kubectl get hr -n <ns> <name> -w

Time budget: 2–3 m of downtime per HR. Pick a maintenance window per CLAUDE.md if the component is operator- or household-facing.

CRI-O image-store bloat from Renovate digest churn

Symptom. A worker node's root LV climbs toward full with no corresponding growth in running workloads. df -h / shows most of the usage under /var/lib/containers/storage/overlay. crictl images lists dozens of <none>-tagged entries — multiple historical digests of the same large image (an ML-serving image, a workflow-runner image, etc.), only the newest of which is actually referenced by a running pod.

How to confirm.

ssh root@<node> "df -h /var/lib/containers; \
  du -sh /var/lib/containers/storage/overlay; \
  crictl images | grep -c '<none>'"

A high <none> count with a mostly-full image-store partition and a node percent-used sitting below imageGCHighThresholdPercent is the signature — kubelet's disk-pressure image GC hasn't fired because the node hasn't crossed the threshold, even though most of the store is dead weight.

Root cause. Two independent conditions compound:

  1. This repo pins every image to a digest (pinDigests: true in the cluster-wide Renovate config). Every Renovate digest bump leaves the prior digest's layers on disk, now unreferenced by any pod (<none> in crictl images).
  2. Historically, kubelet's only image-GC trigger was disk-pressure (imageGCHighThresholdPercent/imageGCLowThresholdPercent). A node sitting just under the high-water mark never reclaims the dangling digests, so they accumulate indefinitely — Renovate's bump cadence sets the accumulation rate, not the GC rate.

Found 2026-11-16 on worker8 (71% root LV, CRI-O image store at 129 GiB of a 199 GiB LV, VG with zero free extents) while worker8 also hosts Ceph mon.m — the disk pressure correlated with two momentary mon quorum blips. worker2 showed the same dangling-digest pattern (100 <none> images) on a much larger disk, confirming this is fleet-wide, not worker8-specific; worker8 just has the smallest disk and the highest-stakes co-tenant.

The fix — imageMaximumGCAge (kubelet, GA since k8s 1.35). This field ages out an image a fixed duration after it stops being referenced by any container, independent of disk-pressure thresholds — it directly targets the Renovate-digest-orphan pattern. Critically, the age clock starts when the image becomes unused, not when it was pulled, so it's immune to Renovate's bump cadence: an old digest becomes eligible the moment the new ReplicaSet/Pod rolls out, not some fixed time later. A running container's image is never evicted, regardless of age — only idle images age out, so the only cost is a re-pull if a rarely-scheduled workload (a CronJob, a seldom-restarted Deployment) needs an image again after it's aged out.

Applied cluster-wide 2026-11-16 via the kube-system/kubelet-config ConfigMap:

imageGCHighThresholdPercent: 72   # was 75
imageGCLowThresholdPercent: 62    # was 65
imageMaximumGCAge: 48h0m0s        # was 0s (disabled)

The tightened thresholds are a disk-pressure backstop independent of the age-based mechanism (worker8's volume group has zero free extents — no LV-extend headroom, so earlier pressure-relief matters even though the age-based GC is the primary lever).

Durability — where this lives and why it survives reprovisioning. kube-system/kubelet-config is a kubeadm-managed ConfigMap, not a Flux/Git-tracked resource. It's the object kubeadm itself uses to distribute cluster-wide KubeletConfiguration — every kubeadm join (a freshly (re)provisioned node) and every kubeadm upgrade node (an existing node re-syncing) renders /var/lib/kubelet/config.yaml from it. That makes it the correct durable home for this setting with zero new moving parts: no ansible template, no extra Flux Kustomization, nothing that could drift from what kubeadm itself delivers to a new node. The ansible repo (kubernetes/common/tasks/kubeadm.yaml in the ansible repo) does not template kubelet config content today and already lags the fleet's live kubelet/kubeadm version — adding a second, ansible-managed copy of this file would create a competing source of truth that the next kubeadm upgrade node would silently overwrite anyway.

Recovery caveat — the backlog does not clear immediately. Per upstream behavior (KEP-4210), the "last used" age clock for every image resets at the kubelet restart that picks up the new config. The existing dangling-digest backlog is not swept on the next GC pass — it clears roughly imageMaximumGCAge (48h) after each node's kubelet restart, or sooner on any node that crosses the 72% disk-pressure threshold in the meantime. No separate manual crictl rmi --prune is required; it is simply not instantaneous.

Rollout — propagating to already-joined nodes. Editing the ConfigMap alone changes nothing until a node re-syncs. Per node, one at a time:

ssh root@<node> "kubeadm upgrade node phase kubelet-config && \
  systemctl restart kubelet"

This is the upstream-supported "re-render /var/lib/kubelet/config.yaml from the ConfigMap without a version bump" path — not a hand-edit of the file. systemctl restart kubelet is required to pick up the change; CRI-O is a separate daemon/socket, so no running container is touched — the node flashes NotReady for a few seconds during the kubelet restart, then returns Ready with the same containers still running.

Order mon-hosting workers last, and confirm Ceph quorum before and after each:

ceph -s   # via a mon pod / toolbox — confirm quorum before and after

Applied 2026-11-16 to all 8 worker-class nodes (worker2–worker8, spark), mon-hosting worker2 (mon.l) and worker8 (mon.m) rolled last; quorum [0,1,2] and 0 mon restarts confirmed before/after each. The masters (master1–3) were skipped that pass and picked the values up on 2026-11-22, when the whole fleet was re-synced for the kubelet changes in Kubelet tuning.

Verification.

# immediately per node:
ssh root@<node> "grep imageMaximumGCAge /var/lib/kubelet/config.yaml"
kubectl get node <node>   # Ready, container counts unchanged

# ~48h after that node's kubelet restart:
ssh root@<node> "du -sh /var/lib/containers/storage/overlay; \
  crictl images | grep -c '<none>'"
ssh root@<node> "journalctl -u kubelet | grep -i \
  'garbage collect\|removing image'"

Recovery if the ConfigMap is ever reset. Because this isn't Git-tracked, a future kubeadm upgrade apply to a new control-plane minor could in principle regenerate kube-system/kubelet-config from a bare ClusterConfiguration and drop these three fields. A backup of the pre-change ConfigMap is on master1 at /root/kubelet-config.backup.20261116-090515.yaml. If the values are ever found reverted, re-apply the three fields above via kubectl -n kube-system edit cm kubelet-config (or kubectl replace -f the backup, adjusted for current content) and re-run the per-node kubeadm upgrade node phase kubelet-config rollout.