From 8fa89fb96fac009a334f6c1b0b33ec53fe0a315a Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Thu, 24 Jun 2021 15:24:58 -0400 Subject: [PATCH] unfreeze dracut, adapt for NM via systemd in initrd Upstream dracut updated NM to run as a systemd service (with full dbus support) in the initrd in [1]. Adapt our systemd units to handle this case. This should still work fine for RHCOS because we still have `Before=dracut-initqueue.service`, which can be dropped when everyone is on dracut 0.54+. Fixes: https://github.com/coreos/fedora-coreos-tracker/issues/842 --- manifest-lock.overrides.yaml | 12 +----------- manifest-lock.x86_64.json | 4 ++-- .../coreos-copy-firstboot-network.service | 12 ++++++------ .../35coreos-network/coreos-enable-network.service | 4 ++-- 4 files changed, 11 insertions(+), 21 deletions(-) diff --git a/manifest-lock.overrides.yaml b/manifest-lock.overrides.yaml index 2b3b40b760..39d903f62b 100644 --- a/manifest-lock.overrides.yaml +++ b/manifest-lock.overrides.yaml @@ -7,14 +7,4 @@ # *should* include a URL in the `metadata.reason` key, though it's acceptable to # omit one for FCOS-specific packages (e.g. ignition, afterburn, etc...). -packages: - dracut: - evr: 053-5.fc34 - metadata: - reason: https://github.com/coreos/fedora-coreos-tracker/issues/842 - type: pin - dracut-network: - evr: 053-5.fc34 - metadata: - reason: https://github.com/coreos/fedora-coreos-tracker/issues/842 - type: pin +packages: {} diff --git a/manifest-lock.x86_64.json b/manifest-lock.x86_64.json index f09770dd9c..19738475e4 100644 --- a/manifest-lock.x86_64.json +++ b/manifest-lock.x86_64.json @@ -229,10 +229,10 @@ "evra": "4.2-1.fc34.x86_64" }, "dracut": { - "evra": "053-5.fc34.x86_64" + "evra": "055-2.fc34.x86_64" }, "dracut-network": { - "evra": "053-5.fc34.x86_64" + "evra": "055-2.fc34.x86_64" }, "e2fsprogs": { "evra": "1.45.6-5.fc34.x86_64" diff --git a/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-network/coreos-copy-firstboot-network.service b/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-network/coreos-copy-firstboot-network.service index e2b8588506..6ba396625b 100644 --- a/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-network/coreos-copy-firstboot-network.service +++ b/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-network/coreos-copy-firstboot-network.service @@ -8,8 +8,8 @@ # - i.e. after /dev/disk/by-label/boot is available # - and after the ignition-dracut GPT generator (see below) # - Need to run before networking is brought up. -# - This is done in nm-run.service [1] -# - i.e. Before=nm-run.service +# - This is done in nm-initrd.service [1] +# - i.e. Before=nm-initrd.service # - Need to make sure karg networking configuration isn't applied # - There are two ways to do this. # - One is to run *before* the nm-config.sh [2] that runs as part of @@ -17,11 +17,11 @@ # - i.e. Before=dracut-cmdline.service # - Another is to run *after* nm-config.sh [2] in dracut-cmdline [3] # and just delete all the files created by nm-initrd-generator. -# - i.e. After=dracut-cmdline.service, but Before=nm-run.service +# - i.e. After=dracut-cmdline.service, but Before=nm-initrd.service # - We'll go with the second option here because the need for the /boot # device (mentioned above) means we can't start before dracut-cmdline.service # -# [1] https://github.com/dracutdevs/dracut/blob/master/modules.d/35network-manager/nm-run.service +# [1] https://github.com/dracutdevs/dracut/blob/master/modules.d/35network-manager/nm-initrd.service # [2] https://github.com/dracutdevs/dracut/blob/master/modules.d/35network-manager/nm-config.sh # [3] https://github.com/dracutdevs/dracut/blob/master/modules.d/35network-manager/module-setup.sh#L34 # @@ -30,8 +30,8 @@ Description=Copy CoreOS Firstboot Networking Config ConditionPathExists=/usr/lib/initrd-release DefaultDependencies=false Before=ignition-diskful.target -Before=nm-run.service -# compat: remove when everyone is on dracut 053+ +Before=nm-initrd.service +# compat: remove when everyone is on dracut 054+ Before=dracut-initqueue.service After=dracut-cmdline.service # Any services looking at mounts need to order after this diff --git a/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-network/coreos-enable-network.service b/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-network/coreos-enable-network.service index 42273e5fa6..92c4829cd1 100644 --- a/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-network/coreos-enable-network.service +++ b/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-network/coreos-enable-network.service @@ -20,8 +20,8 @@ Before=ignition-fetch.service # See hack in coreos-enable-network, as well as coreos-copy-firstboot-network.service. After=dracut-cmdline.service -Before=nm-run.service -# compat: remove when everyone is on dracut 053+ +Before=nm-initrd.service +# compat: remove when everyone is on dracut 054+ Before=dracut-initqueue.service [Service]