Checking for network online
Patrick Williams
patrick at stwcx.xyz
Thu Feb 24 00:48:27 AEDT 2022
On Wed, Feb 23, 2022 at 10:09:19AM +0800, Jiaqing Zhao wrote:
> I think a solution is to set RequiredForOnline=no (https://www.freedesktop.org/software/systemd/man/systemd.network.html#RequiredForOnline=) in all network interface config. This option skips the interface when running systemd-networkd-wait-online.service. Canonical netplan (used in ubuntu server) also uses this option to skip the online check for given interface (https://github.com/canonical/netplan/blob/main/src/networkd.c#L636-L639).
>
> I'll submit a patch to phosphor-networkd later.
I really don't think this is appropriate for all systems. Services have
dependencies on network-online.target for a reason. If the side-effect of
having the BMC network cable unplugged is that the host doesn't boot, that might
be entirely reasonable behavior in some environments.
We use rsyslog as the mechanism to offload our BMC logging data to an
aggregation point. When you have a very large scale deployment, it is actually
better for the system to not come online than for us to lose out on that data,
since we have spare capacity to take its place.
Note that the Canonical netplan only applies this option if the configuration
indicates that the interface is optional, which is entirely appropriate. The
way you wrote it could have been interpreted that they set this on *every*
interface, which is what it seems like you're proposing to do to
phosphor-networkd.
If this is desired behavior for someone, can't you supply a wildcard .network
file that adds this option, rather than modifying phosphor-networkd to manually
add it to each network interface that it is managing?
I believe some designs use a USB network device to connect two internal pieces
of the system and those interfaces are not necessarily managed by
phosphor-networkd (interfaces that, for example connect BMC-to-BMC or
BMC-to-Host). While it is obviously up to the system designer to work through
this bug, by applying this configuration as you proposed you are causing
unusual default behavior in that networkd is going to start waiting for these
internal connections to come online instead of the external interface.
--
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20220223/3a59bafb/attachment.sig>
More information about the openbmc
mailing list