fix(journal-upload): stop transient upload blips from failing nixos-upgrade #32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/journal-upload-blip-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The daily nixos-upgrade.timer on amd reported failure on 2026-08-29 and
2026-08-30 even though the build and the switch completed. Cause: at the
exact second of activation, sgx's systemd-journal-remote (microhttpd
"Application reported internal error, closing connection") closed the
uploader's long-lived POST; systemd-journal-upload exited 1, was picked
up in "auto-restart" substate by switch-to-configuration, whose failed-
unit scan counts a service in auto-restart with ExecMainStatus != 0 as
failed -> "warning: the following units failed: systemd-journal-upload"
-> activation exits 4 -> nixos-upgrade inherits the failure.
SuccessExitStatus=1 does not fix this: verified against a live systemd,
it maps Result to "success" but leaves ExecMainStatus at 1, which is the
property the activation report reads. So the exit code itself must become
0. Run the uploader through a wrapper that exits 0 when exit 1 is
accompanied by the expected "Upload to failed" transport error, and
forwards signals so unit stops don't stall until TimeoutStopSec. Other
exit codes are passed through unchanged.
Same fix applies fleet-wide via metacfg.services.journalUpload (amd, mx,
attic, x1, halo, hermes all use the uploader); the sink-side blips are
observed on both amd and mx.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.