Skip to content

2026-10-24: OpenBao pre-upgrade gate failed on its own scripts, freezing the platform's reconciliation

Kind: reference (incident report)

Severity: warning · Status: mitigated · Resolved by: operator agent · Duration: ~0:10 from detection to resolution, 22:11–22:21 UTC · Taskbase task: #1565

Summary

PR #730 (#1548) added the OpenBao pre-upgrade backup gate. Its Job ran the old scripts and failed at once with sh: can't open '/scripts/snapshot.sh'. The scripts ConfigMap is applied by openbao-backup, and openbao-backup waits for the gate to pass, so the cycle could not clear by itself. Every Kustomization behind openbao stopped reconciling until the operator applied the declared ConfigMap and re-ran the gate. The lasting fix moves that ConfigMap to the gate; it is open for review, hence mitigated.

Impact

  • Services: no outage. OpenBao and everything else kept running. Flux reconciliation froze for openbao and every Kustomization that depends on it, directly or not (about 40, including external-secrets, cert-manager, gitea, keycloak, harbor, mattermost, agent-runners). No change merged to main reached them.
  • Users: none noticed.
  • Data: none at risk. The gate failed before taking a snapshot, and OpenBao was not changed (Helm revision 4, chart 0.8.0, before and after).
  • Duration: 22:11–22:21 UTC, from the Job's failure to all Kustomizations Ready.

Timeline

All times UTC.

Time Event Source
22:10 PR #730 merged as bb9be21 Git
22:11 Detected: init container snapshot of Job openbao-drill/openbao-preupgrade exits 2, sh: can't open '/scripts/snapshot.sh': No such file or directory; openbao-preupgrade reports HealthCheckFailed kustomize-controller event, task #1565
22:15 Root cause found (the live ConfigMap openbao-drill/openbao-backup-scripts, owned by openbao-backup, has no snapshot.sh). Operator applies the ConfigMap content main declares, deletes the failed Job, reconciles openbao-preupgrade; new Job starts 22:15:27 kubectl get cm, Job startTime
22:16 Gate passes: snapshot uploaded and read back, restored, unsealed with the real keys, canary read Job logs
22:21 Resolved: flux get kustomizations -A --status-selector ready=false returns nothing flux output

Root cause

components/openbao/preupgrade/job.yaml mounts the ConfigMap openbao-drill/openbao-backup-scripts (optional, for a new cluster). PR #730 kept the generator of that ConfigMap in components/openbao/backup/kustomization.yaml and added snapshot.sh and a store.sh preupgrade mode to it. The openbao-backup Kustomization applies that directory and depends on openbao, which depends on openbao-preupgrade. So the new Job ran with the old ConfigMap. The ConfigMap could change only after the gate passed, and the gate could pass only with the new ConfigMap. The Namespace, NetworkPolicy and ServiceAccount moved to components/openbao/preupgrade/ in the same PR and reached the cluster. The scripts did not move with them.

What the agent did

Read-only first: flux get kustomizations -A, flux get helmreleases -A, helm -n openbao history openbao, the Job's pod status and init container logs, and the live ConfigMap's keys and owner label. The runbook was OpenBaoPreupgradeGateFailed, roll forward.

  1. Branch fix/1565-openbao-preupgrade-scripts: the openbao-drill scripts ConfigMap is generated by components/openbao/backup/scripts/kustomization.yaml and listed by components/openbao/preupgrade/kustomization.yaml, so openbao-preupgrade applies it. Content unchanged (diffed against main's output). kubectl apply --dry-run=server passed.
  2. kubectl apply --server-side --force-conflicts --field-manager=ops-recovery-1565 -f <ConfigMap>. This applies the content main already declares, which the cycle kept from the cluster. Exit 0. The keys are now drill-server.hcl drill.sh s3.sh snapshot.sh store.sh.
  3. kubectl -n openbao-drill delete job openbao-preupgrade, the runbook's roll-forward step, so that Flux recreates the Job. Exit 0.
  4. flux reconcile kustomization openbao-preupgrade --timeout=25m. It applied main@sha1:0f515eb and the Job completed in 47 s. Snapshot hetzner-mgmt/openbao/snapshots/20261024T221539Z.snap (115432 bytes) was uploaded and read back with a matching SHA-256, restored, unsealed with the real keys and its canary read. preupgrade/last-success.env was recorded with TARGET_CHART=0.8.0.
  5. Waited for openbao, then for all Kustomizations to be Ready. No other write.
  6. kubectl apply --server-side --force-conflicts --field-manager=kustomize-controller of the same ConfigMap with Flux's owner labels, then an identity-only apply as ops-recovery-1565. This hands every key back to kustomize-controller, so a script removed in Git is also removed from the cluster. Exit 0 both times. managedFields now lists kustomize-controller alone.
  7. PR (this one): the fix of step 1, a row in the gate runbook for a stale or missing scripts ConfigMap, the ownership note in docs/content/contribution/components/openbao/backup.md, and this report.

Resolution and verification

  • flux get kustomizations -A --status-selector ready=false and the same for HelmReleases return nothing. openbao-preupgrade, openbao and openbao-backup are Ready at main@sha1:0f515eb.
  • helm -n openbao history openbao: revision 4 deployed, chart 0.8.0, unchanged.
  • Alertmanager: no OpenBaoPreupgradeGateFailed or KubeJobFailed alert for openbao-drill.
  • flux diff kustomization openbao-backup against main: no drift. Against this branch, flux diff kustomization openbao-preupgrade shows one change, the ConfigMap's kustomize.toolkit.fluxcd.io/name label (openbao-backup → openbao-preupgrade). The Job is unchanged, so the merge does not run the gate again. Flux prunes only objects that carry its own owner labels, so openbao-backup leaves the ConfigMap in place once openbao-preupgrade has relabelled it.
  • Nothing is suspended, and no annotation or silence was left behind.

Follow-ups

  • This PR, once merged, makes the fix lasting (status then resolved).
  • 1566: a CI check that a gate Job mounts only what its gate Kustomization, or one it depends on,

    applies. It would have failed #730.

References

  • Alert: OpenBaoPreupgradeGateFailed (runbook) and the Flux error event of flux-system/openbao-preupgrade
  • Taskbase incident task: #1565
  • Pull requests: #730 (the gate), this PR (the fix)
  • Runbook sections: OpenBaoPreupgradeGateFailed, roll forward

Open questions

none