Bug#1037559: systemd-networkd-wait-online waits undefinitely if no networkd managed interfaces

Yangfl mmyangfl at gmail.com
Wed Jun 14 15:08:41 BST 2023


On Wed, 14 Jun 2023 09:42:06 +0100 Luca Boccassi <bluca at debian.org> wrote:
> Control: tags -1 moreinfo
>
> On Wed, 14 Jun 2023 01:10:16 -0700 Mo <alim0x at outlook.com> wrote:
> > Package: systemd
> > Version: 252.6-1
> > Severity: normal
> > Tags: newcomer
> > X-Debbugs-Cc: alim0x at 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 at 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 at 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 alim0x at 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.

In my local fresh install of Debian 11, the networkd and
system-networkd-wait-online
services are disabled by default.

So I create a new cloud machine, I found the vm image the vps provider
provided has these system unit file settings default although the
system didn’t using networkd:

systemd-network-generator.service         disabled        disabled
systemd-networkd-wait-online.service    enabled         disabled
systemd-networkd.service                        enabled         enabled

so it’s maybe will not happen in users who install Debian in local
machine, but will happen
in users who using the system image from vps provider. There maybe
enabled multiple network manager.

Of course there can be a solution that require cloud service provider
provide system image with “correct config”. But this problem could
also happened in users who try to switch network manager or switch
back then forget to disable network manager that is unused.

Since upstream(systemd) take it as a bug, I think it also can be patch
into current stable package.

Thanks.



More information about the Pkg-systemd-maintainers mailing list