openbao: update entry point with data copy and rollback #540

Open
opened 2026-12-06 20:38:43 +00:00 by Claude · 0 comments
Owner

Part of #535

Parent

#535 (spec). Decisions: #533.

What to build

A consumer moves an OpenBao server to a new pinned version with the role's update entry point. The role validates, stops the service, copies the raft data directory to <path>.pre-<old version>, stages the sha256-verified new binary next to the live one and swaps it through the internal _binary_update role. If the new version fails to start or reports the wrong version, both the binary and the data copy are restored before the old binary starts, because OpenBao does not support downgrades. Afterwards the role unseals with openbao_unseal_keys when given, or warns loudly that the server is sealed. Old data copies are left for the consumer.

Acceptance criteria

  • update has its own argument_specs key, validation before any change, and an "Entry points" README entry.
  • _binary_update is included by FQCN at task level; meta dependencies stay empty.
  • The data copy is taken while the service is stopped; a rollback restores it before the old binary starts.
  • After update the server is unsealed when keys are given; otherwise the run shows a warning that it is sealed.
  • Running update at the already-installed version changes nothing.
  • --check previews update without changing the host.
  • Molecule verify runs update against a file:// stand-in for the next version (traefik's pattern) and asserts the new version, the data copy and the unsealed state; it asserts the rollback path with a stand-in that fails to start.
  • The README documents the data copy, that old copies are not removed, and the no-downgrade limit.

Assisted-by: Claude Code

Part of #535 ## Parent #535 (spec). Decisions: #533. ## What to build A consumer moves an OpenBao server to a new pinned version with the role's `update` entry point. The role validates, stops the service, copies the raft data directory to `<path>.pre-<old version>`, stages the sha256-verified new binary next to the live one and swaps it through the internal `_binary_update` role. If the new version fails to start or reports the wrong version, both the binary and the data copy are restored before the old binary starts, because OpenBao does not support downgrades. Afterwards the role unseals with `openbao_unseal_keys` when given, or warns loudly that the server is sealed. Old data copies are left for the consumer. ## Acceptance criteria - [ ] `update` has its own argument_specs key, validation before any change, and an "Entry points" README entry. - [ ] `_binary_update` is included by FQCN at task level; `meta` dependencies stay empty. - [ ] The data copy is taken while the service is stopped; a rollback restores it before the old binary starts. - [ ] After update the server is unsealed when keys are given; otherwise the run shows a warning that it is sealed. - [ ] Running `update` at the already-installed version changes nothing. - [ ] `--check` previews `update` without changing the host. - [ ] Molecule verify runs `update` against a `file://` stand-in for the next version (traefik's pattern) and asserts the new version, the data copy and the unsealed state; it asserts the rollback path with a stand-in that fails to start. - [ ] The README documents the data copy, that old copies are not removed, and the no-downgrade limit. Assisted-by: Claude Code
Claude added the Kind/Feature
Status
Ready for Agent
labels 2026-12-06 20:38:43 +00:00
Claude added a new dependency 2026-12-06 20:38:51 +00:00
Claude added this to the openbao role milestone 2026-12-06 20:42:15 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: Mortis/Kamino#540