Skip to content

Commit

Permalink
boot/finalize-staged: Run after systemd-journal-flush.service
Browse files Browse the repository at this point in the history
In Fedora 31, `systemd-journal-flush.service` uses a new
`--smart-relinquish-var` switch which fixes the
`umount: /var: target is busy` bug by telling journald to stop logging
to `/var` and back to `/run` again during shutdown.

This interacted with `ostree-finalize-staged.service` in a tricky way:
since we weren't strongly ordered against it, when we happened to
finalize after `/var` is relinquished, we never persisted the output
from that service to disk. This then threw off `rpm-ostree status` when
trying to find the completion message to know that finalization went
well.

Just fix this by adding an explicit `After=` on that unit. That way we
shut down *before* `systemd-journal-flush.service` (the `/var`
relinquish bit happens in its `ExecStop=`).

For more info, see:
systemd/systemd@3ff7a50
systemd/systemd@1e187d2
https://bugzilla.redhat.com/show_bug.cgi?id=1751272

Closes: #1926
Approved by: cgwalters
  • Loading branch information
jlebon authored and rh-atomic-bot committed Sep 24, 2019
1 parent 94fcba9 commit 8818263
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/boot/ostree-finalize-staged.service
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ DefaultDependencies=no
RequiresMountsFor=/sysroot
After=local-fs.target
Before=basic.target final.target
# We want to make sure the transaction logs are persisted to disk:
# https://bugzilla.redhat.com/show_bug.cgi?id=1751272
After=systemd-journal-flush.service
Conflicts=final.target

[Service]
Expand Down

0 comments on commit 8818263

Please sign in to comment.