ostree/tests/kolainst/destructive
Colin Walters d3d3e4ea13 Add an ostree-boot-complete.service to propagate staging failures
Quite a while ago we added staged deployments, which solved
a bunch of issues around the `/etc` merge.  However...a persistent
problem since then is that any failures in that process that
happened in the *previous* boot are not very visible.

We ship custom code in `rpm-ostree status` to query the previous
journal.  But that has a few problems - one is that on systems
that have been up a while, that failure message may even get
rotated out.  And second, some systems may not even have a persistent
journal at all.

A general thing we do in e.g. Fedora CoreOS testing is to check
for systemd unit failures.  We do that both in our automated tests,
and we even ship code that displays them on ssh logins.  And beyond
that obviously a lot of other projects do the same; it's easy via
`systemctl --failed`.

So to make failures more visible, change our `ostree-finalize-staged.service`
to have an internal wrapper around the process that "catches" any
errors, and copies the error message into a file in `/boot/ostree`.

Then, a new `ostree-boot-complete.service` looks for this file on
startup and re-emits the error message, and fails.

It also deletes the file.  The rationale is to avoid *continually*
warning.  For example we need to handle the case when an upgrade
process creates a new staged deployment.  Now, we could change the
ostree core code to delete the warning file when that happens instead,
but this is trying to be a conservative change.

This should make failures here much more visible as is.
2022-04-26 13:02:46 -04:00
..
basic-misc.sh main: Also support CLI extensions in /usr/libexec/libostree/ext 2022-01-11 20:13:33 -05:00
data tests/kolainst: Avoid recursive symlinks 2022-01-25 16:44:39 -05:00
deployment-lint deploy: Warn if we find content in the deployment's /var 2021-06-10 07:33:17 -04:00
itest-bare-root.sh tests/kola: Move to tests/kolainst 2020-05-27 15:16:50 +00:00
itest-deploy-selinux.sh tests/kola: Move to tests/kolainst 2020-05-27 15:16:50 +00:00
itest-label-selinux.sh bin/commit: Fix --tree=tar with --selinux-policy 2021-09-30 11:44:27 -04:00
overlay-initrds.sh lib/deploy: Add support for overlay initrds 2020-09-30 13:29:32 -04:00
staged-delay.sh ci: Fix staged-delay to work with newer systemd 2021-05-25 16:28:32 -04:00
staged-deploy.sh Add an ostree-boot-complete.service to propagate staging failures 2022-04-26 13:02:46 -04:00
unlock-transient.sh Add "transient" unlock 2020-08-07 18:57:56 +00:00
var-mount.sh tests/var-mount: tweak test setup 2021-10-19 08:03:09 +00:00