Checking for network online

Lei Yu yulei.sh at bytedance.com
Fri Feb 18 13:29:25 AEDT 2022


On Fri, Feb 18, 2022 at 8:11 AM Jeremy Kerr <jk at codeconstruct.com.au> wrote:
>
> Hi Johnathan,
>
> > Issue: systemd-networkd-wait-online.service stalls for 120 seconds
> > when the managed NICs do not have a network connection.
> >
> > TLDR: Should OpenBMC remove systemd-networkd-wait-online.service
> > universally?
>
> Probably not, it's required to implement network-online,target, which
> is standard, and may be referred to by arbitrary packages.
>
> There's some good background on the issues you're experiencing here:
>
>  https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
>
> in short: most services should be able to start before network-
> online.target, and be able to adapt to changes in network configuration
> after that point.
>
> For your specific issue there:
>
> > Issues: This service blocks entry to multi-user.target.
> > phosphor-state-manager uses multi-user.target to report the BMC is
> > ready to use.
> > This is reported via IPMI Get Device ID.
>
> That sounds like more of an issue of whether that reported state
> actually represents the expected BMC state...

We have an internal "override" config to start
systemd-networkd-wait-online with --any option:

 # override.conf
 [Service]
 ExecStart=
 ExecStart=/lib/systemd/systemd-networkd-wait-online --any

This is mostly about fixing the QEMU CI.
In the real environment the network *should* be up and online so the
above makes the systemd-networkd-wait-online starts OK in both cases.


More information about the openbmc mailing list