[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#990428: ifenslave: Bonding not working on bullseye (using bond-slaves config)



Tags: patch

This regression is currently up for release in the next stable release
of Debian this week! We think this is supposed to be fixed in #987842
but it is not.

In your case you could simply remove the stanzas for enp4s0f0
and enp4s0f1 which would leave you with just the stanza for bond1:

iface bond1 inet static
  bond-slaves enp4s0f0 enp4s0f1

That should work but it is still a regression as it breaks
configuration which worked before.
Therefore and also for more complex scenarios where configuration
specific for children (or s-word) interfaces is needed see the attached
patch which kind of restores the old behaviour.
It ensures that only already up interfaces with bonding configuration
are skipped.

That new / broken behaviour was introduced with the following commit
which had multiple issues. Most of them are already fixed.

commit 326c2b142943cc98798bab653ee96ade91ae58af
Author: Guus Sliepen <guus@debian.org>
Date:   Tue May 8 21:02:30 2018 +0200

    Make a clear distinction between configuring masters and slaves.
    
    In particular, don't configure a master interface from a slave
    stanza. Instead, require that a stanza for the master exists, and
    call ifup recursively on it if necessary.
diff --git a/debian/ifenslave.if-pre-up b/debian/ifenslave.if-pre-up
index 7579d68..97a13e5 100755
--- a/debian/ifenslave.if-pre-up
+++ b/debian/ifenslave.if-pre-up
@@ -83,8 +83,8 @@ enslave_slaves()
 		export IFENSLAVE_ENV_NAME="IFUPDOWN_$slave"
 		IFUPDOWN_IFACE="$(printenv "$IFENSLAVE_ENV_NAME")"
 		unset IFENSLAVE_ENV_NAME
-		if ifquery --state "$slave" 2>/dev/null || [ -n "$IFUPDOWN_IFACE" ] ; then
-			# Skipping interface that's already up or being configured
+		if ($(ifquery --state "$slave" >/dev/null 2>&1) && $(ifquery "$slave" | grep -q bond-master)) || [ -n "$IFUPDOWN_IFACE" ] ; then
+			# Skipping interface that's already up or being configured and has bonding configuration
 			continue
 		else
 			# Ensure $slave is down.

Reply to: