The OpenBao Guest's journal is persistent by declaration (SC-31) #40

Merged
pit merged 2 commits from hermes/SC-31-the-openbao-guest-s-journal-is-persisten into main 2026-11-09 18:45:30 +00:00
Member

Implements SC-31.

Summary

144 carries /var/log/journal today, but the role declared nothing: journald's default, auto, keeps a disk journal only where that directory happens to exist, so a Guest rebuilt from this role would come back with a volatile journal — and lose the boot that says why a unit did not restart. infra-cockpit declares the drop-in for 143 and 145 (semaphore/service/roles/journal); this is the same declaration for 144, in the role that owns the Guest rather than in site.yml, because this repository has one Guest and one role.

 bao/service/roles/openbao/
   handlers/main.yml
+    restart journald            # guarded on check mode
   tasks/main.yml
+    # 0. the journal, before anything is installed
+    /etc/systemd/journald.conf.d/        0755 root:root
+    /etc/systemd/journald.conf.d/persistent.conf
+      [Journal]
+      Storage=persistent
+    flush_handlers              # journald restarts here, before the package
     # 1. the pinned package  …  7. the store's contents

First in the role, before the package, and flushed at once rather than at the play's own flush: a journal made persistent at the end of the play starts after the install and the first unseal it was meant to record. Storage=persistent creates /var/log/journal on that restart; the size cap stays journald's own (a tenth of the filesystem, at most 4G).

Evidence

  • mise exec -- make check — exit 0, env fetch: every case passed.
  • mise exec -- ansible-playbook -i inventories/prod/hosts --syntax-check site.yml — SYNTAX_EXIT=0.
  • The section and the handler rehearsed in check mode, against this machine, sliced from the role's own files (--check --diff), which is what a make service-check renders:
--- before
+++ after: /etc/systemd/journald.conf.d/persistent.conf
@@ -0,0 +1,3 @@
+# Managed by infra-secrets (bao/service/roles/openbao).
+[Journal]
+Storage=persistent

TASK [put the journal on disk before the package is installed]
RUNNING HANDLER [restart journald]   skipping: [localhost]
localhost : ok=2 changed=2 failed=0 skipped=1
  • Not verified here: the first acceptance criterion — a Guest rebuilt from this role carrying /var/log/journal after its first deploy. That needs a 144 rebuild, which is the Operator's, not this branch's. make service-check against PROD needs the store, so it is the Operator's run before the merge.

Merge Danger

Door: two-way. Drop-in only; removing it and restarting journald puts the Guest back on auto.

Blast Radius: one Guest, on its next deploy. make service restarts systemd-journald once on 144 — no restart of the store, and nothing in the store's data path. The role writes the file idempotently, so a second run is changed=0.

Implements [SC-31](https://vikunja.thepit.space/tasks/331). ## Summary 144 carries `/var/log/journal` today, but the role declared nothing: journald's default, `auto`, keeps a disk journal only where that directory happens to exist, so a Guest rebuilt from this role would come back with a volatile journal — and lose the boot that says why a unit did not restart. infra-cockpit declares the drop-in for 143 and 145 (`semaphore/service/roles/journal`); this is the same declaration for 144, in the role that owns the Guest rather than in `site.yml`, because this repository has one Guest and one role. ```diff bao/service/roles/openbao/ handlers/main.yml + restart journald # guarded on check mode tasks/main.yml + # 0. the journal, before anything is installed + /etc/systemd/journald.conf.d/ 0755 root:root + /etc/systemd/journald.conf.d/persistent.conf + [Journal] + Storage=persistent + flush_handlers # journald restarts here, before the package # 1. the pinned package … 7. the store's contents ``` First in the role, before the package, and flushed at once rather than at the play's own flush: a journal made persistent at the end of the play starts after the install and the first unseal it was meant to record. `Storage=persistent` creates `/var/log/journal` on that restart; the size cap stays journald's own (a tenth of the filesystem, at most 4G). ## Evidence - `mise exec -- make check` — exit 0, `env fetch: every case passed.` - `mise exec -- ansible-playbook -i inventories/prod/hosts --syntax-check site.yml` — `SYNTAX_EXIT=0`. - The section and the handler rehearsed in check mode, against this machine, sliced from the role's own files (`--check --diff`), which is what a `make service-check` renders: ```diff --- before +++ after: /etc/systemd/journald.conf.d/persistent.conf @@ -0,0 +1,3 @@ +# Managed by infra-secrets (bao/service/roles/openbao). +[Journal] +Storage=persistent TASK [put the journal on disk before the package is installed] RUNNING HANDLER [restart journald] skipping: [localhost] localhost : ok=2 changed=2 failed=0 skipped=1 ``` - **Not verified here:** the first acceptance criterion — a Guest rebuilt from this role carrying `/var/log/journal` after its first deploy. That needs a 144 rebuild, which is the Operator's, not this branch's. `make service-check` against PROD needs the store, so it is the Operator's run before the merge. ## Merge Danger **Door:** two-way. Drop-in only; removing it and restarting journald puts the Guest back on `auto`. **Blast Radius:** one Guest, on its next deploy. `make service` restarts `systemd-journald` once on 144 — no restart of the store, and nothing in the store's data path. The role writes the file idempotently, so a second run is `changed=0`.
ticket-dispatch: the OpenBao Guest's journal is persistent by declaration (SC-31)
All checks were successful
pr-checks / check (pull_request) Successful in 16s
014077d069
144 carries /var/log/journal today, but the role declared nothing: journald's
default, `auto`, keeps a disk journal only where that directory happens to
exist, so a Guest rebuilt from this role would have come back with a volatile
journal and lost the boot that explains a unit that did not restart. The
cockpit declares the drop-in for 143 and 145; this is the same declaration for
144, in the role that owns the Guest rather than in site.yml, because this
repository has one Guest and one role.

First in the role, before the package: a journal made persistent mid-play
starts after the lines that explain it. `Storage=persistent` creates
/var/log/journal on the journald restart the copy notifies; the size cap stays
journald's own. The handler is guarded on check mode, so `make service-check`
renders the diff and restarts nothing.
Member

Review started (round 1/5) on 014077d069 — reading the diff now.

**Review started** (round 1/5) on 014077d06995b9e5125f7b2c506c3424b1cba2af — reading the diff now.
ticket-dispatch: the journal is on disk before the package is installed (SC-31)
All checks were successful
pr-checks / check (pull_request) Successful in 15s
83ea8ccaf4
The drop-in alone only takes effect at the play's flush — after the install,
the unit's first start and the audit device's first write, which are the lines
a rebuild is read for. Flushed here instead, with only the journald handler
pending, so the install is recorded by the journal it is installed beside. The
handler's own check-mode guard keeps a rehearsal from restarting anything.
bot-minos approved these changes 2026-11-09 18:28:04 +00:00
bot-minos left a comment

repo olympus/infra-secrets · PR #40 · reviewed head 83ea8cc · round 1/5 · verdict merge

Recommendation: merge

Dispatched at 014077d; the branch advanced to 83ea8cc 33 s later ("the journal is on disk before the package is installed"). I reviewed the PR as it stands and verified that the one defect present at the dispatched SHA is closed by that commit — recorded in §Resolved, not counted as live.


Spec

Source: the PR description. SC-31 (vikunja.thepit.space/tasks/331) was not fetchable — the Vikunja API refuses without a credential and this session carries no MCP token for it. Everything below is judged against the contract the description states, not against criteria I cannot read.

requirement (PR description) state evidence
Storage=persistent drop-in declared in the role, not in site.yml met bao/service/roles/openbao/tasks/main.yml:26-46
first in the role, before the package met at head tasks/main.yml:11-51, handler flushed at :48-51
journald restart, guarded on check mode met handlers/main.yml:2-8
size cap left to journald's own default met, and the comment is accurate man journald.conf(5) (systemd 257.13): "defaults to 10% … capped to 4G"
no store restart, two-way door met diff adds no restart openbao notification; nothing on the data path

Findings: none. No scope creep — both hunks are the change, and the handler is the only new one.


Standards

No CODING_STANDARDS.md and no CONTRIBUTING.md. Rules in force, and read: AGENTS.md §Checks, §Decisions (the workshop ADRs bind first — none of 0001-0007 touch journald or the service layer), docs/agents/domain.md. The new code follows the role's existing house conventions: numbered sections, why-comments, when: not ansible_check_mode on the handler as on its neighbour.

  • ADVISORY — bao/service/roles/openbao/tasks/main.yml:26-51: nothing in the gate covers this file. AGENTS.md §Checks fixes make check as env-pin + env-map + the fetch's tests, and CI's pr-checks / check is that target and nothing more. A later edit that deletes the drop-in reds nothing; the only check that renders the role is the by-hand --check --diff. Repo-wide gap, not introduced here — advice, not a round trip.

Resolved before this review (not live at head)

  • BLOCKER (at 014077d only) — tasks/main.yml:21-25 claimed "the install below and the store's first unseal are on disk", but the copy only notified the handler. With no flush, the handler ran at the existing meta: flush_handlers in §6 — after the package install, the unit's first start and the initialisation. Evidence: --check --diff over the role at 014077d places RUNNING HANDLER [restart journald] after "apply the unit and the environment before the wait", not before §1; an isolated probe (copy → notify → stat) reports marker exists before play flush: False, and True with a flush inserted.
    Precision: at 014077d the drop-in still made the store's first unseal durable, because journald restarts ahead of restart openbao in that same flush. What did not hold was the install and the first start.
  • Closed by 83ea8cc — tasks/main.yml:48-51 adds meta: flush_handlers immediately after the copy; only the journald handler is pending there. Verified: the same probe shows the handler's effect before the next task, and the check-mode run puts RUNNING HANDLER [restart journald] at :50, ahead of §1. Only this one handler is pending at that point, so nothing else is restarted early.

Verified by hand

what result
mise exec -- make check exit 0, env fetch: every case passed. (touches no Ansible file — reproduces the author's evidence, proves nothing about the role)
ansible-playbook -i inventories/prod/hosts --syntax-check site.yml exit 0 ([WARNING] group and host both named bao — pre-existing)
the role under --check --diff against localhost drop-in renders exactly the 3 lines claimed; persistent.conf 0 → 3
handler/flush ordering probe (copy → notify → stat, with and without flush_handlers) handler effect False before the play flush, True right after a flush
second run of the same copy task changed=0, handler not notified — idempotent as claimed
man journald.conf(5), systemd 257.13 persistent → "/var/log/journal hierarchy (which is created if needed)"; SystemMaxUse default 10% capped at 4G
CI pr-checks / check (pull_request) success on both 014077d and 83ea8cc

What I could not verify, and why

  • SC-31's own acceptance criteria — no credential reaches Vikunja from this session; reviewed against the PR description only.
  • A rebuilt Guest 144 carrying /var/log/journal after its first deploy — needs the Guest, which is the Operator's run. The author says the same; it is not a finding, it is unproven scope.
  • make service-check against PROD — needs the store and its root token.
  • The journald restart actually creating /var/log/journal — documented behaviour I read in the man page, not something I executed: this host gives me no root, and restarting systemd-journald on a shared machine is not a reviewer's act.

Summary

axis findings worst
Standards 1 (0 blocker, 1 advisory) no automated coverage of the new tasks — pre-existing repo-wide gap
Spec 0 —

One advisory, below the volume threshold; nothing blocks. The change is two files, +51 lines, every hunk accounted for, no secret and no store path in it. Merge at 83ea8cc.

<!-- minos-review repo=olympus/infra-secrets pr=40 head=83ea8ccaf409c28bbb36714fdf939cfc078402af round=1/5 verdict=merge --> **repo** olympus/infra-secrets · **PR** #40 · **reviewed head** `83ea8cc` · **round** 1/5 · **verdict** merge `Recommendation: merge` Dispatched at `014077d`; the branch advanced to `83ea8cc` 33 s later ("the journal is on disk before the package is installed"). I reviewed the PR as it stands and verified that the one defect present at the dispatched SHA is closed by that commit — recorded in §Resolved, not counted as live. --- ## Spec **Source:** the PR description. SC-31 (`vikunja.thepit.space/tasks/331`) was **not fetchable** — the Vikunja API refuses without a credential and this session carries no MCP token for it. Everything below is judged against the contract the description states, not against criteria I cannot read. | requirement (PR description) | state | evidence | | --- | --- | --- | | `Storage=persistent` drop-in declared in the role, not in `site.yml` | met | `bao/service/roles/openbao/tasks/main.yml:26-46` | | first in the role, before the package | met at head | `tasks/main.yml:11-51`, handler flushed at `:48-51` | | journald restart, guarded on check mode | met | `handlers/main.yml:2-8` | | size cap left to journald's own default | met, and the comment is accurate | man `journald.conf(5)` (systemd 257.13): "defaults to 10% … capped to 4G" | | no store restart, two-way door | met | diff adds no `restart openbao` notification; nothing on the data path | **Findings: none.** No scope creep — both hunks are the change, and the handler is the only new one. --- ## Standards No `CODING_STANDARDS.md` and no `CONTRIBUTING.md`. Rules in force, and read: `AGENTS.md` §Checks, §Decisions (the `workshop` ADRs bind first — none of 0001-0007 touch journald or the service layer), `docs/agents/domain.md`. The new code follows the role's existing house conventions: numbered sections, why-comments, `when: not ansible_check_mode` on the handler as on its neighbour. - **ADVISORY** — `bao/service/roles/openbao/tasks/main.yml:26-51`: nothing in the gate covers this file. `AGENTS.md` §Checks fixes `make check` as env-pin + env-map + the fetch's tests, and CI's `pr-checks / check` is that target and nothing more. A later edit that deletes the drop-in reds nothing; the only check that renders the role is the by-hand `--check --diff`. Repo-wide gap, not introduced here — advice, not a round trip. --- ## Resolved before this review (not live at head) - **BLOCKER (at `014077d` only)** — `tasks/main.yml:21-25` claimed "the install below and the store's first unseal are on disk", but the copy only *notified* the handler. With no flush, the handler ran at the existing `meta: flush_handlers` in §6 — after the package install, the unit's first start and the initialisation. Evidence: `--check --diff` over the role at `014077d` places `RUNNING HANDLER [restart journald]` after *"apply the unit and the environment before the wait"*, not before §1; an isolated probe (copy → notify → stat) reports `marker exists before play flush: False`, and `True` with a flush inserted. Precision: at `014077d` the drop-in still made the *store's first unseal* durable, because journald restarts ahead of `restart openbao` in that same flush. What did not hold was the install and the first start. - **Closed by `83ea8cc`** — `tasks/main.yml:48-51` adds `meta: flush_handlers` immediately after the copy; only the journald handler is pending there. Verified: the same probe shows the handler's effect before the next task, and the check-mode run puts `RUNNING HANDLER [restart journald]` at `:50`, ahead of §1. Only this one handler is pending at that point, so nothing else is restarted early. --- ## Verified by hand | what | result | | --- | --- | | `mise exec -- make check` | exit 0, `env fetch: every case passed.` (touches no Ansible file — reproduces the author's evidence, proves nothing about the role) | | `ansible-playbook -i inventories/prod/hosts --syntax-check site.yml` | exit 0 (`[WARNING] group and host both named bao` — pre-existing) | | the role under `--check --diff` against localhost | drop-in renders exactly the 3 lines claimed; `persistent.conf` `0 → 3` | | handler/flush ordering probe (copy → notify → stat, with and without `flush_handlers`) | handler effect `False` before the play flush, `True` right after a flush | | second run of the same `copy` task | `changed=0`, handler not notified — idempotent as claimed | | man `journald.conf(5)`, systemd 257.13 | `persistent` → "`/var/log/journal` hierarchy (which is created if needed)"; `SystemMaxUse` default 10% capped at 4G | | CI | `pr-checks / check (pull_request)` success on both `014077d` and `83ea8cc` | ## What I could not verify, and why - **SC-31's own acceptance criteria** — no credential reaches Vikunja from this session; reviewed against the PR description only. - **A rebuilt Guest 144 carrying `/var/log/journal` after its first deploy** — needs the Guest, which is the Operator's run. The author says the same; it is not a finding, it is unproven scope. - **`make service-check` against PROD** — needs the store and its root token. - **The journald restart actually creating `/var/log/journal`** — documented behaviour I read in the man page, not something I executed: this host gives me no root, and restarting `systemd-journald` on a shared machine is not a reviewer's act. --- ## Summary | axis | findings | worst | | --- | --- | --- | | Standards | 1 (0 blocker, 1 advisory) | no automated coverage of the new tasks — pre-existing repo-wide gap | | Spec | 0 | — | One advisory, below the volume threshold; nothing blocks. The change is two files, +51 lines, every hunk accounted for, no secret and no store path in it. Merge at `83ea8cc`.
pit force-pushed hermes/SC-31-the-openbao-guest-s-journal-is-persisten from 83ea8ccaf4
All checks were successful
pr-checks / check (pull_request) Successful in 15s
to a6a1c78e47
All checks were successful
pr-checks / check (pull_request) Successful in 16s
2026-11-09 18:44:01 +00:00
Compare
pit merged commit b732c837b1 into main 2026-11-09 18:45:30 +00:00
pit deleted branch hermes/SC-31-the-openbao-guest-s-journal-is-persisten 2026-11-09 18:45:30 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
olympus/infra-secrets!40
No description provided.