Network bond at boot in RHEL 8.4
Hi,
I'm trying to create a network bond at boot time in RHEL 8.4.
(This is for a system with an encrypted root partition that is unlocked by clevis/tang, so the network needs to be up before root can be mounted.)
It works fine if I configure the bond post-boot, as described in eg
RHEL8 Networking manual
But I have not been able to get the bond working via dracut.
I have added to /etc/dracut.conf.d:
hostonly_cmdline=yes
and
kernel_cmdline="bond=bond0:enp1s0,enp7s0:mode=802.3ad,miimon=100 ip=X.X.X.X::X.X.X.X:255.255.254.0::bond0:none nameserver=X.X.X.X"
What happens at boot is that the system fails to bring up the network, repeatedly printing:
dracut-initqueue: cat: /sys/class/net/bonding_masters/ifindex: Not a directory
bond0: (slave enp1s0): failed to get link speed/duplex
bond0: (slave enp7s0): failed to get link speed/duplex
(I think these are all symptoms of the network not being up, not direct causes of the problem.)
If I enter the luks password by hand, the system boots, but still doesn't bring up the network, until the dracut bond is taken down, allowing a "normal' network manager bond to replace it.
Comparing those two connections shows a few differences in options that seem like they might be relevant, namely:
autoconnect-retries, multi-connect, wait-device-timeout, autoconnect-slaves
but there doesn't seem to be any way to set those for dracut.
It all works fine if I use mode=active-backup instead of 802.3ad.
If anyone can advise how to get the 802.3ad bond to work, that would be much appreciated. A team rather than a bond is not an option, since it's impossible to specify the runner at boot time. I also have not had any luck with dracut's legacy networking. Thanks!