[systemd-devel] Ordering services issue. Trying to start ptp4l in bonding setup fails as bonding appears to take a while.
Brian Hutchinson
b.hutchman at gmail.com
Thu Dec 2 19:54:48 UTC 2021
Hi James,
On Thu, Dec 2, 2021 at 1:50 PM James Feeney <james at nurealm.net> wrote:
> On 12/2/21 08:41, Brian Hutchinson wrote:
> > Yup, I'm using systemd-networkd ... I think I have to in order to
> leverage network-online.target etc., and set up my network (bonding in this
> case) with .netdev and .network files in /etc/systemd/network.
>
> You don't "have" to do anything. It is a choice. Other network managers
> you might consider include:
> ConnMan
> netctl
> NetworkManager
> Wicd
>
> > What kind of platform are you on? PC, embedded?
>
> Just Arch Linux on various PCs, but, if you are already running systemd, I
> don't expect that the hardware makes any difference.
>
> > Can you give an example of what this would look like?
>
> I could, but, unless you want to abandon systemd-networkd for some reason,
> and also not consider some of the other popular network management systems,
> there would be no point.
>
Well, I'm on an embedded imx8 platform and my ethernet interface is an
Ethernet Switch ;) I have to bust that switch up into individual network
interfaces with DSA (Distributed Switch Architecture) so everything is
wildly different than just a simple, normal NIC interface. I have no
display/graphics, keyboard etc., so I can't just use a 'normal' network
manager most are familiar with.
>
> > ... but I can also check carrier of my interfaces ...
>
> The kernel bonding module is its own thing, and automatically monitors the
> state of its slave devices and manages the state of its virtual interface.
> I don't know why you would want to bother with the carrier state of -
> presumably - an ethernet device, or whatever. If there were a problem with
> the bonding module, that would be an entirely separate issue.
>
I think I found my issue. I've got a fairly new systemd but looks like I'm
missing this patch:
https://github.com/systemd/systemd/pull/14536/commits/75cd4a5d929480055c74d14fef6f25c9e0e966e0
... so I cannot specify my bond1 min and max operational state which should
be degraded-carrier:carrier
> Of course, this all presupposes that you have actually selected and
> configured the correct options to the kernel bonding module, to provide the
> functionality you want with the hardware you are using. But that is
> nothing to do with systemd or with ptp4l.
>
All done in /etc/systemd/network with .netdev and .network files.
> > My issue is with systemd starting PTP before the bond is fully set up.
>
> As I mentioned, I cannot help you with systemd-networkd. I cannot find
> any author attributions in or to the systemd-networkd source, and none of
> the actual developers here appears to have volunteered any insight - and
> good luck with that.
>
> Still, you might read here for clues:
https://wiki.archlinux.org/title/Systemd-networkd
> though, you will have to disregard the reference to "Wireless bonding",
> which was originally written by me, but is now quite obsolete, without
> updates, having been subsequently "vandalized" by a rather persistent
> inexperienced and arrogant user.
>
Ha, ha, don't you just love it when that happens! It looks like I was
trying out commands based on all the documentation that I saw that my code
base didn't support. And it looks like I need that feature because if I
only have one network of my bond hooked up then that is operational state
'degraded-carrier' and if I have both interfaces hooked up then the
operational state is just 'carrier' ... and I need the
systemd-networkd-wait-online.service to look for both of those cases.
Take care,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20211202/8391b5fd/attachment-0001.htm>
More information about the systemd-devel
mailing list