Skip to content

OpenBaoPreupgradeGateFailed

Severity: critical. Fires when the Job openbao-drill/openbao-preupgrade has failed for 5 minutes, or ran past its 30-minute deadline. The gate runs before Flux applies a new OpenBao chart: it snapshots the running OpenBao, uploads and checks the snapshot, restores it into a throwaway OpenBao, unseals it with the real keys and reads the canary. The openbao Kustomization waits, so the upgrade is not applied. Production OpenBao keeps running its old version. How the gate works: OpenBao backups.

Labels: namespace (openbao-drill), job_name, component (openbao). The upstream KubeJobFailed fires for the same Job: handle both in one incident.

Read-only checks

flux --context admin@mgmt-cluster get kustomizations openbao-preupgrade openbao
kubectl --context admin@mgmt-cluster -n openbao-drill get job openbao-preupgrade -o jsonpath='{.spec.template.spec.containers[0].env[?(@.name=="TARGET_CHART")].value}{"\n"}'
kubectl --context admin@mgmt-cluster -n openbao-drill logs job/openbao-preupgrade --all-containers --prefix
kubectl --context admin@mgmt-cluster -n openbao-drill get externalsecret openbao-backup
kubectl --context admin@mgmt-cluster -n openbao get cronjob openbao-snapshot   # does the nightly snapshot pass?

The failed step names the cause. The steps after snapshot are the monthly drill's: see OpenBaoRestoreDrillFailed for keys and drill.

Step Typical cause
any step, sh: can't open '/scripts/<name>.sh' or an unknown store.sh mode The ConfigMap openbao-drill/openbao-backup-scripts is missing or older than the Job. openbao-preupgrade applies it with the Job (components/openbao/backup/scripts/): check its keys with kubectl --context admin@mgmt-cluster -n openbao-drill get configmap openbao-backup-scripts -o jsonpath='{.data}' and its kustomize.toolkit.fluxcd.io/name label
snapshot OpenBao is sealed or down, or the openbao-backup AppRole login fails. The same causes as OpenBaoSnapshotFailed
upload The plausible-size check (smaller than half the previous snapshot), or a store error. A shrunken OpenBao before an upgrade must be explained before anything is applied
keys The Secret openbao/openbao-unseal-keys or the Role openbao/openbao-restore-drill is missing
drill, did not reach status 0 after the restart The keys do not unseal the snapshot. The serious case: escalate to a person at once (task #1378, offline keys)
drill, login or canary The AppRole or the canary changed while the gate ran. Run the gate again
drill, server log about an unknown storage or config field The new image cannot read this snapshot. The upgrade must not go ahead: read the release notes of every version in between

The gate deletes the restored copy, the snapshot in the pod and the keys when the step ends. A failed pod holds no secrets, only logs.

Roll forward

Fix the cause, then run the gate again. Flux recreates a deleted Job on its next reconcile:

kubectl --context admin@mgmt-cluster -n openbao-drill delete job openbao-preupgrade
flux --context admin@mgmt-cluster reconcile kustomization openbao-preupgrade --with-source
kubectl --context admin@mgmt-cluster -n openbao-drill logs -f job/openbao-preupgrade --all-containers --prefix

The alert clears when the new Job no longer counts as failed. Once the gate passes, Flux applies the openbao Kustomization. The new image then waits for the restart window, which is a person task.

Roll back

Nothing was applied, so there is nothing to roll back. If the upgrade must not go ahead (the new version cannot read the snapshot), revert the upgrade commit in Git; the Job is then recreated for the old version and passes. Never change or rotate the unseal keys to make the gate pass.