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
openbaoand every Kustomization that depends on it, directly or not (about 40, includingexternal-secrets,cert-manager,gitea,keycloak,harbor,mattermost,agent-runners). No change merged tomainreached 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.
- Branch
fix/1565-openbao-preupgrade-scripts: theopenbao-drillscripts ConfigMap is generated bycomponents/openbao/backup/scripts/kustomization.yamland listed bycomponents/openbao/preupgrade/kustomization.yaml, soopenbao-preupgradeapplies it. Content unchanged (diffed againstmain's output).kubectl apply --dry-run=serverpassed. kubectl apply --server-side --force-conflicts --field-manager=ops-recovery-1565 -f <ConfigMap>. This applies the contentmainalready declares, which the cycle kept from the cluster. Exit 0. The keys are nowdrill-server.hcl drill.sh s3.sh snapshot.sh store.sh.kubectl -n openbao-drill delete job openbao-preupgrade, the runbook's roll-forward step, so that Flux recreates the Job. Exit 0.flux reconcile kustomization openbao-preupgrade --timeout=25m. It appliedmain@sha1:0f515eband the Job completed in 47 s. Snapshothetzner-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.envwas recorded withTARGET_CHART=0.8.0.- Waited for
openbao, then for all Kustomizations to be Ready. No other write. kubectl apply --server-side --force-conflicts --field-manager=kustomize-controllerof the same ConfigMap with Flux's owner labels, then an identity-only apply asops-recovery-1565. This hands every key back tokustomize-controller, so a script removed in Git is also removed from the cluster. Exit 0 both times.managedFieldsnow listskustomize-controlleralone.- 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=falseand the same for HelmReleases return nothing.openbao-preupgrade,openbaoandopenbao-backupare Ready atmain@sha1:0f515eb.helm -n openbao history openbao: revision 4deployed, chart 0.8.0, unchanged.- Alertmanager: no
OpenBaoPreupgradeGateFailedorKubeJobFailedalert foropenbao-drill. flux diff kustomization openbao-backupagainstmain: no drift. Against this branch,flux diff kustomization openbao-preupgradeshows one change, the ConfigMap'skustomize.toolkit.fluxcd.io/namelabel (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, soopenbao-backupleaves the ConfigMap in place onceopenbao-preupgradehas 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 offlux-system/openbao-preupgrade - Taskbase incident task: #1565
- Pull requests: #730 (the gate), this PR (the fix)
- Runbook sections: OpenBaoPreupgradeGateFailed, roll forward
Open questions¶
none