Repository navigation
Description
What's the problem
The bundle window is only useful if the journal survives reboots for all of it. The parent issue's acceptance criterion says to make journald persistent "if it is not already persistent for every unit" and to measure that first — and the measurement matters because the shipped image already sets Storage=persistent with SystemMaxUse=200M (os/rootfs/Dockerfile:174) and binds one journal home on /data (os/overlay/pithead-journal-persist), while rigs are volatile by design (#1817). Nobody has pinned, on a real boot, that every Pithead unit lands in the persistent journal and that the cap reaches the default 72-hour window. Child issue of #4032.
What it impacts
Every support bundle taken after a reboot (the common owner response to an incident is a reboot): if any unit is volatile or the 200M cap rolls past the incident, the evidence is gone before the bundle is even built.
How I found it
From parent issue #4032 ("Unknown: whether the appliance journal is persistent today for all services. The fix should measure that first"). Verified in this checkout: the journald drop-in is baked at os/rootfs/Dockerfile:174; os/overlay/pithead-journal-persist bind-mounts /data/pithead/journal onto /var/log/journal and skips rigs; the #1029/#1030 incident in that unit's header is the standing proof that a configured-persistent journal can still be lost, which is why the guarantee needs a test, not a reading of the config.
How important is it
High within #4032: an explicit acceptance criterion, and the whole bundle feature is worthless over reboots if this is not pinned.
Acceptance criteria
- A
tests/osselftest and a tier4-kvm boot-phase assertion establish, on the appliance image: the effective journald config is persistent;/var/log/journalis the /data bind; and across a rebootjournalctl --list-bootsstill lists the previous boot. - The measurement is done and reported on the issue: with the stack running at representative load, the oldest journal entry's age versus the 72-hour default window under
SystemMaxUse=200M. Only if the measurement shows the window is not covered doesSystemMaxUsechange, sized from /data free space with a stated rule, and the change ships with the measurement quoted. - The rig exclusion stays: rigs remain volatile (A provisioned rig boots mining and never commits its slot: the journal reclaim meets the #1792 bind mountpoint and errexit takes
local-minerdown #1817) and the tests assert the appliance-only scope rather than weakening it. - The persistence guarantee and its rig exclusion are stated in the OS docs (
os/README.mdor the docs page that covers appliance storage).
Possible solutions
Extend the existing tests/os selftest suite and add one KVM boot-phase assertion reusing the image-upgrade/boot legs the RC gate already runs; measure in the same KVM run by writing a marker to the journal, rebooting, and checking --list-boots and --oldest-entry timestamps.
Parent: #4032
Worker brief: Test tier: tier4-kvm, one phase at a time (boot; extend to the fault phase only if the measurement needs it), plus a tier-1 tests/os selftest for the logic. Quote the bench-ci evidence block for the KVM leg in the PR. Always --base develop; tiers 1-3 green on the head first.
Do the measure-then-pin work for parent issue #4032, per the acceptance criteria on the issue. Read os/rootfs/Dockerfile (the journald drop-in line), os/overlay/pithead-journal-persist and its .service unit first — their headers explain the #1029/#1030 and #1791 incidents, so write the assertion against the failure those describe (a journal that configured persistent but was not there after a boot). Prefer no config change: measure on KVM, post the reading, and only resize SystemMaxUse if the 72-hour window demonstrably does not survive. Rig volatile behaviour (#1817) must not regress — keep the pithead-journal-persist rig branch as-is and assert the appliance scope. Run the tests/os suite per tests/os/run.sh conventions. No comments in new code. Do not touch the dashboard, notifier, or CLI bundle — sibling child issues own those.
Activity
pithead-developer commentedon Nov 12, 2026
Journal window measurement (tier4-kvm boot leg)
From bench job
3849@57afc8252f005cac9af71998d943c708b4044e73(tier4-kvm, boot phase, 293 pass · 0 fail · 0 skip), the reboot leg's two window rows sample journal content bytes (journal file allocation is quantized in 8 MiB steps, so allocation-based sampling is meaningless; the numbers below are uncompressed-text upper bounds):journal measurement (boot reboot burst): 128210 bytes of content in 30 s — an upper bound of 15024 KiB/h uncompressed, so the 204800 KiB cap covers at least 13 h at that load; oldest surviving entry 362 sjournal measurement (settled idle load): 41500 bytes of content in 311 s — an upper bound of 469 KiB/h uncompressed, so the 204800 KiB cap covers at least 436 h at that load; oldest surviving entry 362 sAnd the persistence guarantees from the same boot, all green:
journald runs Storage=persistent with the 200M cap and the journal bind unit is active (evidence survives reboots; rigs stay volatile by design)journald writes the /data/pithead/journal bind (inode 1835011, ext2/ext3) and the persistent boot list holds 2 boots across the reboot— the previous boot survives, oldest entry 362 s old at sample time.Reading. At the settled idle rate the 200M cap covers ~436 h — six times the 72-hour bundle default — and that is an uncompressed upper bound, since journald stores entries compressed, so the real margin is larger. The 13 h figure is the worst-case rate around a reboot (flush and unit start-up), not a sustained load. One honest limit: the boot-phase guest is unprovisioned, so this measures the appliance's own idle logging, not the stack's; if a running stack's steady logging ever exceeds six times the appliance idle rate, the window stops being covered and the /data-sized resize rule from this issue applies. This measurement does not trigger that, so
SystemMaxUsestays at 200M — no config change ships. The rig exclusion is unchanged: the rig and rigmedia legs keep assertingStorage=volatilethere, and the new config row pins the appliance scope only.PR: #4055
pithead-developer commentedon Nov 13, 2026
Reviewer ruling accepted: my earlier reading here does not meet criterion 2. The 436 h figure extrapolated a 311 s window on an unprovisioned boot-phase guest — no monerod, p2pool, Tari, dashboard or podman log load — so it cannot carry the "with the stack running at representative load" condition, and the "SystemMaxUse stays 200M" decision I stated on that basis is withdrawn pending the proper reading.
The measurement is now pinned to where the criterion's condition actually holds: the provision phase's reboot leg, which ends with the wizard-provisioned stack running (monerod restarted into its initial sync, Tari, p2pool, Caddy, dashboard, xmrig), samples journal content bytes over a 300 s window there and reports the KiB/h upper bound, the hours the 204800 KiB cap covers at that load, and the oldest surviving entry's age.
Bench job
3882@05f68f833d2c3a1e8349d8245c85dd60d79a57cb(tier4-kvm, phases=provision) runs the current PR head. When it completes I will post the provisioned-stack reading and the resize decision under this issue's rule —SystemMaxUsechanges only if that reading shows the 72 h window is not covered.pithead-developer commentedon Nov 14, 2026
Journal window on the provisioned stack: reading and decision
Job
3882@05f68f833d2c3a1e8349d8245c85dd60d79a57cbfailed before it measured anything: the bench had no cached older image to use as the provision migration baseline. Source job3944@fa7ec5a97122e06a1b1a13acf51a905dd943f31ebuilt that baseline. The provision phase then ran on the PR head:bench-ci job 3955@05f68f833d2c3a1e8349d8245c85dd60d79a57cb · pithead · tier4-kvm
Generated by
bench-ci evidence 3955@05f68f833d2c3a1e8349d8245c85dd60d79a57cb; re-run it to check.The row from the provision reboot leg, quoted from the job log. Monerod (in its initial sync), Tari, p2pool, the dashboard and xmrig were running at the time:
journal measurement (provisioned stack): 170618 bytes of content in 301 s — an upper bound of 1992 KiB/h uncompressed, so the 204800 KiB cap covers at least 102 h at that load; oldest surviving entry 1562 sjournald runs Storage=persistent with the 200M cap and the journal bind unit is active (evidence survives reboots; rigs stay volatile by design)Decision:
SystemMaxUsestays at 200M. At the provisioned-stack rate the cap covers at least 102 h, more than the 72 h window. 1992 KiB/h is an uncompressed upper bound and journald compresses stored entries, so the real margin is larger. This replaces the reading I withdrew on 2026-11-13. PR: #4055pithead-developer commentedon Nov 14, 2026
Merged in #4055.