Bug: Fail heimdall over to another worker within ~2 minutes of node loss #37

Merged
claude-bot Bot merged 1 commits from bug/heimdall-failover into main 2026-11-20 23:40:06 +01:00

Why

When heimdall's node died, the pod stayed bound to it for ~5 minutes because of Kubernetes' default 300s not-ready/unreachable tolerations, so recovery took ~7-8 minutes.

Changes (04-k8s-apps)

  • tolerationSeconds: 30 for node.kubernetes.io/unreachable and node.kubernetes.io/not-ready.
  • strategy: Recreate: heimdall is single-replica with an RWO Longhorn volume, so a rolling update could deadlock on a Multi-Attach if the new pod lands on another node.

Already applied / verified

  • Already live: the existing Deployment's defaulted rollingUpdate block was removed once with kubectl patch (the API server rejects Recreate while it is set), then pulumi up was run locally.
  • Tested by hard-stopping k3s-worker-2: eviction 30s after NotReady, volume attached on worker-3 ~50s later, heimdall back ~2-2.5 min after power-off.

The deploy on merge should be a no-op.

## Why When heimdall's node died, the pod stayed bound to it for ~5 minutes because of Kubernetes' default 300s `not-ready`/`unreachable` tolerations, so recovery took ~7-8 minutes. ## Changes (`04-k8s-apps`) - `tolerationSeconds: 30` for `node.kubernetes.io/unreachable` and `node.kubernetes.io/not-ready`. - `strategy: Recreate`: heimdall is single-replica with an RWO Longhorn volume, so a rolling update could deadlock on a Multi-Attach if the new pod lands on another node. ## Already applied / verified - Already live: the existing Deployment's defaulted `rollingUpdate` block was removed once with `kubectl patch` (the API server rejects `Recreate` while it is set), then `pulumi up` was run locally. - Tested by hard-stopping k3s-worker-2: eviction 30s after NotReady, volume attached on worker-3 ~50s later, heimdall back ~2-2.5 min after power-off. The deploy on merge should be a no-op.
claude-bot Bot added 1 commit 2026-11-20 23:38:52 +01:00
bug(k8s-apps): fail heimdall over within ~30s of node loss
Deploy k8s Apps / Pulumi Deploy (pull_request) Skipped
Deploy k8s Apps / Pulumi Preview (pull_request) Successful in 47s
b4d27c6546
Default 300s not-ready/unreachable tolerations kept the pod bound to a dead node for ~5 min. Lower both to 30s, and switch to Recreate so a single-replica RWO pod never waits on a Multi-Attach during rollouts. Verified by stopping worker-2: pod running on worker-3 ~2 min later.

The existing Deployment's defaulted rollingUpdate block was removed once with kubectl patch so the API server accepts Recreate.
claude-bot Bot merged commit ba53cbc465 into main 2026-11-20 23:40:06 +01:00
Sign in to join this conversation.