Bug#959075: Still not working on Debian testing

2020-07-05 Thread richard lucassen
On Sun, 05 Jul 2020 09:58:46 +0800
Paul Wise  wrote:

> On Sat, 2020-07-04 at 18:08 +0200, richard lucassen wrote:
> 
> > Rereading it, I don't know if this issue was present in 2.9 or
> > earlier. I just noticed it while testing the new version.
> 
> Would you mind downgrading to 2.9 and testing it?
> You can install it from Debian buster or snapshot.d.o

I tried to find out which line causes this error and it is line 12
in /etc/network/if-pre-up.d/ifenslave:

ip link add dev "$IFACE" type bond

It has nothing to do with the ifenslave package:

# modprobe -rv bonding
rmmod bonding
# ip link add dev bond0 type bond
RTNETLINK answers: File exists

And ifenslave_2.9 loads the bonding module in "add_master()":

# If the bonding module is not yet loaded, load it.
if [ ! -r /sys/class/net/bonding_masters ]; then
modprobe -q bonding
fi

HTH,

R.

-- 
richard lucassen
https://contact.xaq.nl/



Bug#959075: Still not working on Debian testing

2020-07-05 Thread richard lucassen
On Sun, 05 Jul 2020 09:58:46 +0800
Paul Wise  wrote:

> > Rereading it, I don't know if this issue was present in 2.9 or
> > earlier. I just noticed it while testing the new version.
> 
> Would you mind downgrading to 2.9 and testing it?
> You can install it from Debian buster or snapshot.d.o

No message indeed:

# wget
http://ftp.nl.debian.org/debian/pool/main/i/ifenslave/ifenslave_2.9_all.deb

# ifdown bond0

# modprobe -rv bonding

# dpkg --purge ifenslave

# dpkg -i ifenslave_2.9_all.deb

# ifup bond0
#

(no message)

# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v5.7.0-1-amd64

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: eth2 (primary_reselect always)
Currently Active Slave: eth2
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notification Delay (ms): 0
ARP Polling Interval (ms): 2000
ARP IP target/s (n.n.n.n form): 10.234.0.33, 10.234.0.34

Slave Interface: eth2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 90:b1:1c:33:94:d8
Slave queue ID: 0

Slave Interface: eth3
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 90:b1:1c:33:94:d9
Slave queue ID: 0

-- 
richard lucassen
https://contact.xaq.nl/



Bug#959075: Still not working on Debian testing

2020-07-04 Thread Paul Wise
On Sat, 2020-07-04 at 18:08 +0200, richard lucassen wrote:

> Rereading it, I don't know if this issue was present in 2.9 or earlier.
> I just noticed it while testing the new version.

Would you mind downgrading to 2.9 and testing it?
You can install it from Debian buster or snapshot.d.o

-- 
bye,
pabs

https://wiki.debian.org/PaulWise


signature.asc
Description: This is a digitally signed message part


Bug#959075: Still not working on Debian testing

2020-07-04 Thread richard lucassen
On Sat, 04 Jul 2020 13:41:33 +0800
Paul Wise  wrote:

> Is this a regression from 2.9 or just an old bug still present?

Rereading it, I don't know if this issue was present in 2.9 or earlier.
I just noticed it while testing the new version.

-- 
richard lucassen
https://contact.xaq.nl/



Bug#959075: Still not working on Debian testing

2020-07-04 Thread richard lucassen
On Sat, 04 Jul 2020 13:41:33 +0800
Paul Wise  wrote:

> > Ok, two remaining cometic issues in 2.11 than :-)
> 
> Sounds like the issue is fixed then, marked it as fixed.

Yep
 
> > # ifup bond0
> > /etc/network/if-pre-up.d/ifenslave: 39: echo: echo: I/O error
> > /etc/network/if-pre-up.d/ifenslave: 39: echo: echo: I/O error
> > 
> > You get this error when you try to set a /sys/ option that is not
> > allowed, but the script does not tell which option throws an error.
> > See diff attached.
> 
> I'll apply the patch you sent in another upload.

Maybe "[warning]" is better than "[error]"
 
> > Another cosmetic issue:
> > 
> > # ifdown bond0
> > # modprobe -rv bonding
> > rmmod bonding
> > # ifup bond0
> > RTNETLINK answers: File exists
> > # 
> 
> Is this a regression from 2.9 or just an old bug still present?

Still present.

R.


-- 
richard lucassen
http://contact.xaq.nl/



Bug#959075: Still not working on Debian testing

2020-07-03 Thread Paul Wise
On Fri, 3 Jul 2020 11:15:30 +0200 richard lucassen wrote:

> Ok, two remaining cometic issues in 2.11 than :-)

Sounds like the issue is fixed then, marked it as fixed.

> # ifup bond0
> /etc/network/if-pre-up.d/ifenslave: 39: echo: echo: I/O error
> /etc/network/if-pre-up.d/ifenslave: 39: echo: echo: I/O error
> 
> You get this error when you try to set a /sys/ option that is not
> allowed, but the script does not tell which option throws an error. See
> diff attached.

I'll apply the patch you sent in another upload.

> Another cosmetic issue:
> 
> # ifdown bond0
> # modprobe -rv bonding
> rmmod bonding
> # ifup bond0
> RTNETLINK answers: File exists
> # 

Is this a regression from 2.9 or just an old bug still present?

-- 
bye,
pabs

https://wiki.debian.org/PaulWise


signature.asc
Description: This is a digitally signed message part


Bug#959075: Still not working on Debian testing

2020-07-03 Thread richard lucassen
On Fri, 03 Jul 2020 10:42:26 +0800
Paul Wise  wrote:

> > $ dpkg -l | grep ifenslave
> > ii  ifenslave2.10+nmu2
> > 
> > The lines "bond-slaves" and "bond-primary" still do not work:
> 
> Please retry your test with ifenslave 2.11.

Oops, sorry, I missed that one, I did not realize I'm on testing, not
sid :-(

Ok, two remaining cometic issues in 2.11 than :-)

# ifup bond0
/etc/network/if-pre-up.d/ifenslave: 39: echo: echo: I/O error
/etc/network/if-pre-up.d/ifenslave: 39: echo: echo: I/O error

You get this error when you try to set a /sys/ option that is not
allowed, but the script does not tell which option throws an error. See
diff attached. Example updelay and downdelay are apparently not allowed
using arp and this patch will tell you what went wrong:

iface bond0 inet static
address 10.234.0.33
netmask 255.255.255.0
network 10.234.0.0
broadcast 10.234.0.255
bond-slaves eth2 eth3
bond-mode active-backup
bond-primary eth2
bond-downdelay 200
bond-updelay 200
bond-arp_interval 2000
bond-arp_ip_target 10.234.0.32, 10.234.0.34

# ifup bond0
[error] unable to set downdelay to 200
[error] unable to set updelay to 200


Another cosmetic issue:

# ifdown bond0
# modprobe -rv bonding
rmmod bonding
# ifup bond0
RTNETLINK answers: File exists
# 

But when loading the kernel module before ifup then the RTNETLINK
error disappears:

# ifdown bond0
# modprobe -rv bonding
rmmod bonding
# modprobe -v bonding
insmod /lib/modules/5.7.0-1-amd64/kernel/drivers/net/bonding/bonding.ko 
# ifup bond0
# 

For the rest is seems to be ok now, thnx! :)

Just my 2 cts,

R.

-- 
richard lucassen
https://contact.xaq.nl/
--- /etc/network/if-pre-up.d/ifenslave	2020-07-02 10:35:20.0 +0200
+++ /etc/network/if-pre-up.d/ifenslave.new	2020-07-03 11:03:15.807658451 +0200
@@ -36,8 +36,10 @@
 	# $1 = basename of the file in bonding/ to write to.
 	# $2 = value to write. Won't write if $2 is empty.
 	if [ -n "$2" ] ; then
-		echo "$2" > "/sys/class/net/$BOND_MASTER/bonding/$1"
-		return $?
+		echo "$2" > "/sys/class/net/$BOND_MASTER/bonding/$1" 2>/dev/null
+		EXITCODE=$?
+		[ ${EXITCODE} -ne 0 ] && echo "[error] unable to set $1 to $2"
+		return ${EXITCODE}
 	fi
 	return 0
 }


Bug#959075: Still not working on Debian testing

2020-07-02 Thread Paul Wise
On Thu, 2 Jul 2020 22:55:03 +0200 richard lucassen wrote:

> $ dpkg -l | grep ifenslave
> ii  ifenslave2.10+nmu2
> 
> The lines "bond-slaves" and "bond-primary" still do not work:

Please retry your test with ifenslave 2.11.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise


signature.asc
Description: This is a digitally signed message part


Bug#959075: Still not working on Debian testing

2020-07-02 Thread richard lucassen
Debian testing:

$ dpkg -l | grep ifenslave
ii  ifenslave2.10+nmu2
all  configure network interfaces for parallel routing (bonding)


The lines "bond-slaves" and "bond-primary" still do not work:

iface bond0 inet static
address 10.234.0.32
netmask 255.255.255.0
network 10.234.0.0
broadcast 10.234.0.255
bond-slaves eth2 eth3
bond-mode active-backup
bond-primary eth2
bond-arp_interval 2000
bond-arp_ip_target 10.234.0.33, 10.234.0.34

# ifup bond0
# 

# cat /proc/net/bonding/bond0 
Ethernet Channel Bonding Driver: v5.7.0-1-amd64

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: None
MII Status: down
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notification Delay (ms): 0
ARP Polling Interval (ms): 2000
ARP IP target/s (n.n.n.n form): 10.234.0.33, 10.234.0.34

I miss the slaves eth2 and eth3, so I add them by manually:

# echo "+eth2" > /sys/class/net/bond0/bonding/slaves
# echo "+eth3" > /sys/class/net/bond0/bonding/slaves

[or:]

# ip link set eth2 master bond0
# ip link set eth3 master bond0

# echo eth2 > /sys/class/net/bond0/bonding/primary

# cat /proc/net/bonding/bond0 
Ethernet Channel Bonding Driver: v5.7.0-1-amd64

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: eth2 (primary_reselect always)
Currently Active Slave: eth2
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notification Delay (ms): 0
ARP Polling Interval (ms): 2000
ARP IP target/s (n.n.n.n form): 10.234.0.33, 10.234.0.34

Slave Interface: eth2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 90:b1:1c:33:94:d8
Slave queue ID: 0

Slave Interface: eth3
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 90:b1:1c:33:94:d9
Slave queue ID: 0


-- 
richard lucassen
http://contact.xaq.nl/



Bug#959075: Still not working on Debian testing

2020-07-01 Thread Di Domizio Daniele
Hello,
bonding still not going up on the latest ifenslave 2.10+nmu2.

My problem seems to be the IFUPDOWN_$IFACE variable on line 84, which is not 
null and makes the script skip the interface enslaving.

I changed line 84 to

if ifquery --state $slave 2>/dev/null; then

and now the bond comes up correctly.

Daniele


Bug#959075: Still not working on Debian testing

2020-06-26 Thread richard lucassen
Quick & Dirty workaround:

Add a line in /etc/network/if-pre-up.d/ifenslave just under #!/bin/sh

BOND_MASTER=$IFACE

The BOND_MASTER variable is empty.

-- 
richard lucassen
http://contact.xaq.nl/



Bug#959075: Still not working on Debian testing

2020-06-22 Thread Di Domizio Daniele
Hello,
latest ifenslave 2.10+nmu1 still doesn't work for me on Debian testing. This is 
what I get when I try to "ifup bond0":

/etc/network/if-pre-up.d/ifenslave: 39: cannot create 
/sys/class/net//bonding/miimon: Directory nonexistent
/etc/network/if-pre-up.d/ifenslave: 39: cannot create 
/sys/class/net//bonding/downdelay: Directory nonexistent
/etc/network/if-pre-up.d/ifenslave: 39: cannot create 
/sys/class/net//bonding/updelay: Directory nonexistent
Device "" does not exist.
/etc/network/if-pre-up.d/ifenslave: 39: cannot create 
/sys/class/net//bonding/mode: Directory nonexistent


I didn't change /etc/network/interfaces, this configuration was working in the 
previous releases:

auto lo
iface lo inet loopback

auto bond0
iface bond0 inet static
   address 10.7.47.4
   netmask 255.255.255.0
   network 10.7.47.0
   broadcast 10.7.47.255
   gateway 10.7.47.254
   dns-nameservers 10.8.28.1
   dns-search [...]
   bond-mode 802.3ad
   bond-slaves eth6 eth7
  bond-miimon 100
   bond-downdelay 200
   bond-updelay 200


Thanks!