On Wed, 14 Jun 2023 22:08:41 +0800 Yangfl <mmyan...@gmail.com> wrote: > On Wed, 14 Jun 2023 09:42:06 +0100 Luca Boccassi <bl...@debian.org> wrote: > > Control: tags -1 moreinfo > > > > On Wed, 14 Jun 2023 01:10:16 -0700 Mo <ali...@outlook.com> wrote: > > > Package: systemd > > > Version: 252.6-1 > > > Severity: normal > > > Tags: newcomer > > > X-Debbugs-Cc: ali...@outlook.com > > > > > > Dear Maintainer, > > > > > > after upgrade to debian 12 from debian 11, the system boots using > > almost ~2min > > > to prompt login. > > > > > > after check for systemd-analyze, get info: > > > > > > root@vm:~# systemd-analyze time > > > Startup finished in 2.246s (kernel) + 2min 3.788s (userspace) = 2min > > 6.035s > > > graphical.target reached after 2min 3.610s in userspace. > > > > > > root@vm:~# systemd-analyze blame > > > 2min 189ms systemd-networkd-wait-online.service > > > 4.253s kdump-tools.service > > > 1.910s apparmor.service > > > 1.267s ifupdown-pre.service > > > ... > > > > > > in my machine there is not using systemd-networked, and no interfaces > > managed by > > > networkd. > > > > Then why is systemd-networkd-wait-online being pulled in? Did you > > enable it or one of the targets that pull it in? If it's not in use as > > you say, it should not run in the first place. > > > > -- > > Kind regards, > > Luca Boccassi > > (On behalf of ali...@outlook.com as he is facing some network problem) > > Thanks for your hint, this problem original happened in my cloud > machine, so I checked again.
On first boot systemd uses presets (systemd.preset(5)) to configure the enable/disable state of services. By default, systemd-networkd.service is enabled via presets and this pulls in systemd-networkd-wait-online.service automatically as well, while ifupdown provides an `ifupdown-wait-online.service` alternative which also satisfies `network-online.target`. Given that debian defaults to ifupdown, I wonder if debian's systemd packaging should by default set the systemd-networkd.service preset state to disabled? (It'll only affect first boots and explicit calls to `systemctl preset`). In any case, container providers may want to deal with this either in their templates or when starting up containers. We also ran into this with bookworm templates in Proxmox VE and generate a preset file[1] for this now to debian containers. [1] https://git.proxmox.com/?p=pve-container.git;a=commit;h=e11806e0de064e6570d40e7c04bc4656687b2c62