From 426339cc3f60660458044c6fbe0b0d6f7e950ab4 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 17 Mar 2020 21:44:02 +0000 Subject: [PATCH] overlay/ignition-ostree-growfs: Don't run if root= karg This occurs in the currently artificial scenario of the RHCOS upgrade tests from previous 4.2 Anaconda-based builds. This wouldn't happen in practice because growfs is already keyed off only executing on the Ignition boot, and there's no way we'd rebase this code and release updated 4.2 bootimages. But, we already have similar exclusions in the mount code, so let's do the same for growfs. --- .../modules.d/40ignition-ostree/ignition-ostree-growfs.service | 3 +++ 1 file changed, 3 insertions(+) diff --git a/overlay.d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-growfs.service b/overlay.d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-growfs.service index e005657f1b..30f02b939d 100644 --- a/overlay.d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-growfs.service +++ b/overlay.d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-growfs.service @@ -2,6 +2,9 @@ Description=Ignition OSTree: Grow root filesystem DefaultDependencies=false ConditionKernelCommandLine=ostree +# Similar to the other mount rules, suppress invocation if we detect +# we are running from a legacy setup created by Anaconda. +ConditionKernelCommandLine=!root ConditionPathExists=!/run/ostree-live Before=initrd-root-fs.target After=ignition-ostree-mount-firstboot-sysroot.service