Skip to content

docs(cluster): lesson — tofu-controller reconcile hang on runner death#2775

Merged
agentydragon merged 2 commits into
develfrom
docs/tofu-controller-rpc-hang-lesson
Jul 4, 2026
Merged

docs(cluster): lesson — tofu-controller reconcile hang on runner death#2775
agentydragon merged 2 commits into
develfrom
docs/tofu-controller-rpc-hang-lesson

Conversation

@agentydragon

@agentydragon agentydragon commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Documents the tofu-controller reconcile-hang incident that froze haku's email-account Terraform (agent-machine-access) after a wyrm2 reboot, and propagates the recognizers into the operational runbook so the failure modes are caught during an incident.

New lessoncluster/docs/lessons_learned/2026_07_03_tofu_controller_runner_rpc_hang.md:

  • Root cause (reconcile goroutine parks forever in the runner Init RPC — waitForReady:true + deadline-less context; controller-runtime never re-runs the key).
  • Secondary bug (Failed runner pods never reaped), aggravating factor (all runners co-locate on wyrm2), and the transient ArtifactFailed/etcd-contention compounding factor.
  • Resolution + upstream fix filed: flux-iac/tofu-controller#1838.

Runbook propagationcluster/docs/troubleshooting.md:

  • New recipe under tofu-controller Issues: 'Reconcile Hang After a Node Reboot' (recognize → restart).
  • New recipe under Cilium Issues: 'Policy denied/ClusterIP Timeout During Control-Plane Instability' (don't chase the datapath; a denied drop from an unrelated pod is correct; check etcd first).
  • cluster/AGENTS.md: surface tofu-controller in the troubleshooting pointer.

Docs-only.

RCA for the tofu-controller upstream bug where a reconcile goroutine parks
forever in the runner Init RPC when a runner pod dies mid-reconcile (waitForReady
+ deadline-less context), which froze haku's email-account TF (agent-machine-access)
after a wyrm2 reboot. Includes root cause with code refs, recovery, the compounding
transient Cilium-policy/etcd-contention episode, and the upstream fix we filed
(flux-iac/tofu-controller#1838).
Copilot AI review requested due to automatic review settings July 4, 2026 00:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

…ooting runbook

Add operational recognizers to troubleshooting.md so the failure modes are
caught during an incident (not just after finding the dated lesson):
- tofu-controller reconcile hang after a node reboot (recognize + restart).
- transient 'Policy denied'/ClusterIP timeout during etcd contention (don't
  chase the datapath; a denied drop from an unrelated pod is correct).
Also surface tofu-controller in the AGENTS.md troubleshooting pointer.
@agentydragon agentydragon enabled auto-merge (squash) July 4, 2026 00:22
@agentydragon agentydragon merged commit 28a8d66 into devel Jul 4, 2026
12 checks passed
@agentydragon agentydragon deleted the docs/tofu-controller-rpc-hang-lesson branch July 4, 2026 00:24
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.

2 participants