From 3f33f4d057506970682e9de4eff06881d678f18a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 26 May 2026 09:46:44 +0200 Subject: [PATCH] units: drop After=network-online.target from imds services The imds services are (very-) early boot services, ordered before sysinit.target. OTOH, network-online.target is something that is often established very late [1]. In fact, we always recommended to _not_ depend on it for things that are ordered before the usual targets that allow user logins (e.g. graphical.target). So we certainly cannot add early-boot ordering for it. Currently systemd-imds-imports.service is conditionalized to only run in the initrd. But if the unit is enabled in the host system, it would affect the transaction there, so we should drop this bogus ordering everywhere. (I think this might have been added by mistake. After all, systemd-imds-import.service itself shouldn't care about the network.) This fixes boot ordering issues reported upstream and in Fedora [2, 3]. [1] https://systemd.io/NETWORK_ONLINE/#network-connectivity-has-been-established-network-onlinetarget [2] https://github.com/systemd/systemd/pull/40980#discussion_r2949473028 [3] https://bugzilla.redhat.com/show_bug.cgi?id=2481304 --- units/systemd-imds-import.service.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/units/systemd-imds-import.service.in b/units/systemd-imds-import.service.in index 9704557fbb..24eee236b8 100644 --- a/units/systemd-imds-import.service.in +++ b/units/systemd-imds-import.service.in @@ -11,12 +11,14 @@ Description=Import System Credentials from IMDS Documentation=man:systemd-imds(1) Documentation=man:systemd.system-credentials(7) + DefaultDependencies=no -Wants=systemd-imdsd.socket network-online.target -After=systemd-imdsd.socket network-online.target +Wants=systemd-imdsd.socket +After=systemd-imdsd.socket Before=sysinit.target systemd-firstboot.service Conflicts=shutdown.target Before=shutdown.target + ConditionPathExists=/etc/initrd-release [Service]