ostree-prepare-root: Requires=sysroot.mount
authorColin Walters <walters@verbum.org>
Fri, 8 May 2020 12:49:55 +0000 (12:49 +0000)
committerColin Walters <walters@verbum.org>
Fri, 8 May 2020 12:50:55 +0000 (12:50 +0000)
With just `After=` we'll still try to run in the scenario
where `sysroot.mount` fails because the rootfs didn't appear.
And this will end up spewing an error which can confuse people
into thinking something is wrong at the ostree level.

This has come up numerous times w/{Fedora,RHEL} CoreOS, most
recently while looking at
https://bugzilla.redhat.com/show_bug.cgi?id=1803130

src/boot/ostree-prepare-root.service

index 63357581aaf25557a749943d05ba390ab5612cf4..91692205f9a57cee1ca26c402e0ede18e4519bce 100644 (file)
@@ -23,6 +23,7 @@ ConditionKernelCommandLine=ostree
 ConditionPathExists=/etc/initrd-release
 OnFailure=emergency.target
 After=sysroot.mount
+Requires=sysroot.mount
 Before=initrd-root-fs.target
 
 [Service]