From cc7fb964725f43a0e5c7f633e002830f0b4971eb Mon Sep 17 00:00:00 2001 From: Guilherme Puida Moreira Date: Tue, 24 Mar 2026 12:36:56 -0300 Subject: [PATCH] generate: order service After=systemd-sysusers.service netplan-configure.service needs to resolve the "systemd-network" GID. To do that, is ordered After=nss-user-lookup.target. However, if this target is After= another service that is itself After=network-online.target (for example, winbind.service), this causes an ordering cycle. Mar 23 18:02:51 netplan-winbind systemd[1]: network.target: Found ordering cycle: winbind.service/stop after nss-user-lookup.target/stop after netplan-configure.service/stop after network-pre.target/stop after network.target/stop - after winbind.service Mar 23 18:02:51 netplan-winbind systemd[1]: network.target: Job winbind.service/stop deleted to break ordering cycle starting with network.target/stop Since "systemd-network" is created early by systemd-sysusers, we can order the service After=systemd-sysusers.service to ensure that the group already exists without triggering network-related cycles. --- netplan-configure.service | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netplan-configure.service b/netplan-configure.service index 67c20bc74..a6b68dd30 100644 --- a/netplan-configure.service +++ b/netplan-configure.service @@ -8,9 +8,9 @@ Wants=systemd-udevd.service Conflicts=shutdown.target Before=shutdown.target network-pre.target Before=systemd-networkd.service NetworkManager.service -# Run After=nss-user-lookup.target, to allow lookup of the "systemd-network" GID +# Run After=systemd-sysusers.service, to allow lookup of the "systemd-network" GID # (LP: #2071747) -After=local-fs.target nss-user-lookup.target systemd-udevd-control.socket +After=local-fs.target systemd-sysusers.service systemd-udevd-control.socket [Service] Type=oneshot