- Package:
- network-manager
- Source:
- network-manager
- Description:
- network management framework (daemon and userspace tools)
- Submitter:
- Michel Meyers
- Date:
- 2022-07-22 09:21:05 UTC
- Severity:
- normal
Dear Maintainer, I had a bond configured as described in Example 1 on: https://wiki.debian.org/Bonding This morning, my server's bond interface showed down, and its slaves kept getting removed. After some digging, I found that networkmanager had gotten installed and a check in nmcli showed that it had taken over each of the slave interfaces while listing bond0 as unmanaged. It appears that NM ignores the "slaves eth0 eth1" directive in /etc/network/interfaces so unless each of the interfaces is specifically named as in Example 2, NM takes over the slaves, killing the bond. - Michel
Control: reassign -1 network-manager Reassigning to correct package. Kind regards, Andrei
Am 01.03.21 um 10:41 schrieb Andrei POPESCU: If you want to prevent NM to "auto" manage your devices, you could use /usr/share/doc/network-manager/examples/server.conf (copy it to /etc/NetworkManager/conf.d/) Alternative, you can tell NM explicitly which devices it should ignore. See man NetworkManager.conf → unmanaged-devices
I don't normally use NM and don't have it installed. It must've gotten pulled in as a dependency of some package (my fault for not catching it really) and the nightly systemd restart of services then somehow caused it to take over. I have now created [device] sections declaring the slaves as managed=0 in the NetworkManager.conf (left over after uninstalling NM), but anyone with the same config as me making the same mistake of inadvertently installing NM will land in the same weird situation where their bond0 interface is up but not getting its slaves. (I've also started looking at specifically declaring the slave interfaces in /etc/network/interfaces, but not had success with that so far as it stops the bond0 interface from coming up correctly. "Example 2" from the docs seems broken here ... more debugging to be done.) - Michel
Am 01.03.21 um 11:56 schrieb Michel Meyers: Trying to parse and interpret /etc/network/interfaces in NetworkManager is a losing battle I fear. We have some support to understand basic ifupdown configurations, but it's incomplete and buggy. Can you share your /e/n/i?
Sure:------ # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) # The loopback interface auto lo iface lo inet loopback # The first network card - this entry was created during the Debian installation # (network, broadcast and gateway are optional) #auto eth0 auto bond0 iface bond0 inet static address 192.168.1.2 netmask 255.255.255.0 gateway 192.168.1.1 mtu 9000 slaves ens6 eth1 bond-mode active-backup bond-miimon 100 bond-downdelay 200 bond-updelay 200 post-up route add 192.168.0.1 gw 192.168.1.147 && ip route add 1.1.1.1 via 192.168.1.11 && ip route add 1.0.0.1 via 192.168.1.12 pre-down route del 192.168.0.1 gw 192.168.1.147 && ip route del 1.1.1.1 via 192.168.1.11 && ip route del 1.0.0.1 via 192.168.1.12 iface bond0 inet6 auto privext 2 auto bond0:0 allow-hotplug bond0:0 iface bond0:0 inet static address 192.168.1.5 netmask 255.255.255.0 iface bond0:0 inet6 auto privext 2 ------ My guess is that the fact that there's no iface definition for the slaves (ens6 and eth1) caused them to be taken over by NM. (The only indication NM could've had to avoid them is the "slaves" stanza within the bond0 iface definition.) I've since tried to re-define them like this:------ # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) # The loopback interface auto lo iface lo inet loopback # The first network card - this entry was created during the Debian installation # (network, broadcast and gateway are optional) #auto eth0 auto bond0 iface bond0 inet static address 192.168.1.200 netmask 255.255.255.0 gateway 192.168.1.1 mtu 9000 bond-slaves ens6 eth1 bond-primary ens6 bond-mode active-backup bond-miimon 100 bond-downdelay 200 bond-updelay 200 post-up route add 192.168.0.1 gw 192.168.1.1 && ip route add 1.1.1.1 via 192.168.1.11 && ip route add 1.0.0.1 via 192.168.1.12 pre-down route del 192.168.0.1 gw 192.168.1.1 && ip route del 1.1.1.1 via 192.168.1.11 && ip route del 1.0.0.1 via 192.168.1.12 iface bond0 inet6 auto privext 2 auto ens6 allow-bond ens6 iface ens6 inet manual bond-master bond0 auto eth1 allow-bond eth1 iface eth1 inet manual bond-master bond0 auto bond0:0 allow-hotplug bond0:0 iface bond0:0 inet static address 192.168.1.5 netmask 255.255.255.0 iface bond0:0 inet6 auto privext 2 ------ But that fails with: ------ Mar 1 10:15:07 server ifup[69522]: No iface stanza found for master bond0 Mar 1 10:15:07 server ifup[69518]: run-parts: /etc/network/if-pre-up.d/ifenslave exited with return code 1 Mar 1 10:15:07 server ifup[69516]: ifup: failed to bring up ens6 ------ I have yet to figure out why the ifenslave check fails. (Seems to be running 'ifstate -l "$IF_BOND_MASTER"': ifstate is not a command that's in my path and the only ifstate script that I found in /usr/share/doc/ifupdown/contrib/ifstate doesn't take -l as a parameter. Maybe some package versions are out of sync on my system.) tl;dr: If it's easy to catch the 'slaves' stanza in /e/n/i and have NM consider the specified slaves as unmanaged, that would be nice, but the occurrence of this issue is admittedly very rare and thus may not be worth the effort. - Michel
Am 01.03.21 um 13:59 schrieb Michel Meyers: Reading https://www.commandlinux.com/man-page/man5/interfaces.5.html , it appears "slave" is no native ifupdown config stanza. I suppose it is implemented by a third party package? Which brings me back to my concern, that this is really a losing battle, since the interfaces file format is not specified in a way, which would make it easy to gather all managed interfaces. We already special case "bridge-ports" [1], and maybe we could extend that to also consider "slaves". But I really don't like that we don't have a proper API here. Maybe you could convince the ifupdown maintainer to provide such an API, e.g. via "ifquery", where we could query all interfaces that are managed by ifupdown. Regards, Michael [1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/master/src/core/settings/plugins/ifupdown/nms-ifupdown-plugin.c#L255
Guessing its Debian specific? I got it from here: https://wiki.debian.org/Bonding#Configuration_-_Example_1 - Michel
Am 02.03.21 um 19:46 schrieb Michel Meyers: Ok, seems this is not a native ifupdown config stanza but "implemented" by the ifenslave package.
My good friend, My name is Mohamed Abdou and I am the manager of the United Bank of Africa. Last week I emailed you business and investment proposals. Did you get my message last week? . Please contact me and let me know if you received it or not. Hope to hear from you soon. Have a good day. Mr. Mohammed Abdou