Bug#699445: ifenslave-2.6: bond-primary does not apply
On Tue, Feb 05, 2013 at 10:42:40AM +0100, Jonas Genannt wrote: severity 699445 important tags 699445 +patch +confirmed thanks Dear Maintainer, I also run into the problem. This is an serious problem if you are using active-backup and want to use an primary interface. Please see attached debdiff, I have fixed that problem. Could you please update your package? Thanks for the patch, it looks good so I applied it without any changes. I've just uploaded a new package to unstable. This problem should also be fixed in wheezy, if you update your package in unstable I can submit an unblock request. Yes, please do that. -- Met vriendelijke groet / with kind regards, Guus Sliepen g...@debian.org signature.asc Description: Digital signature
Bug#699445: ifenslave-2.6: bond-primary does not apply
severity 699445 important tags 699445 +patch +confirmed thanks Dear Maintainer, I also run into the problem. This is an serious problem if you are using active-backup and want to use an primary interface. Please see attached debdiff, I have fixed that problem. Could you please update your package? This problem should also be fixed in wheezy, if you update your package in unstable I can submit an unblock request. Thanks, Jonas ifenslave_20-21.debdiff Description: Binary data
Bug#699445: ifenslave-2.6: bond-primary does not apply
Package: ifenslave-2.6 Version: 1.1.0-20 Severity: normal Dear Maintainer, The primary master is not apply on the system because sysfs primary must be call after sysfs_add slaves. As a workaround i have moved the call to the setup_master function after enslave_slaves function. I don't know if it is a good method but it seems to work correctly Regards. -- System Information: Debian Release: 7.0 APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-4-amd64 (SMP w/12 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages ifenslave-2.6 depends on: ii iproute 20120521-3 ii libc62.13-37 Versions of packages ifenslave-2.6 recommends: ii net-tools 1.60-24.2 ifenslave-2.6 suggests no packages. -- Configuration Files: /etc/network/if-pre-up.d/ifenslave changed: [ $VERBOSITY = 1 ] set -x IFSTATE=/etc/network/run/ifstate add_master() { # Return if $BOND_MASTER is already a bonding interface. [ -f /sys/class/net/$BOND_MASTER/bonding/slaves ] return # If the bonding module is not yet loaded, load it. if [ ! -r /sys/class/net/bonding_masters ]; then modprobe -q bonding fi # Create the master interface. if ! grep -sq \\$BOND_MASTER\\ /sys/class/net/bonding_masters; then echo +$BOND_MASTER /sys/class/net/bonding_masters fi } sysfs_change_down() { # Called with : # $1 = basename of the file in bonding/ to write to. # $2 = value to write. Won't write if $2 is empty. if [ $2 ] ; then # If the value we plan to write is different from the current one... if ! grep -sq \\$2\\ /sys/class/net/$BOND_MASTER/bonding/$1 ; then # ...and the master is up... if ip link show $BOND_MASTER | grep -sq '[,]UP[,]' ; then # ...bring the master down. ip link set dev $BOND_MASTER down fi fi sysfs $1 $2 fi } sysfs() { # Called with : # $1 = basename of the file in bonding/ to write to. # $2 = value to write. Won't write if $2 is empty. if [ $2 ] ; then echo $2 /sys/class/net/$BOND_MASTER/bonding/$1 return $? fi return 0 } sysfs_add() { #??Called with : # $1 = target filename. # $2 = values to write. for value in $2; do # Do not add $2 to $1 if already present. if ! grep -sq \\$value\\ /sys/class/net/$BOND_MASTER/bonding/$1 then sysfs $1 +$value fi done } early_setup_master() { # Warning: the order in wich we write into the sysfs files is important. # Double check in drivers/net/bonding/bond_sysfs.c in linux kernel source tree # before changing anything here. # fail_over_mac must be set before enslavement of any slaves. sysfs fail_over_mac $IF_BOND_FAIL_OVER_MAC } enslave_slaves() { case $BOND_SLAVES in none) BOND_SLAVES= ;; all) BOND_SLAVES=`sed -ne 's/ *\(eth[^:]*\):.*/\1/p' /proc/net/dev` AUTOIF=yes ;; esac [ $VERBOSITY = 1 ] v=-v for slave in $BOND_SLAVES ; do if ( [ $AUTOIF ] grep -q ^$slave= $IFSTATE ) ; then echo Not enslaving interface $slave since it is already configured else # Ensure $slave is down. ip link set $slave down 2/dev/null if ! sysfs_add slaves $slave 2/dev/null ; then echo Failed to enslave $slave to $BOND_MASTER. Is $BOND_MASTER ready and a bonding interface ? 2 else # Bring up slave if it is the target of an allow-bondX stanza. # This is usefull to bring up slaves that need extra setup. ifup $v --allow $BOND_MASTER $slave fi fi done } setup_master() { # Warning: the order in wich we write into the sysfs files is important. # Double check in drivers/net/bonding/bond_sysfs.c in linux kernel source tree # before changing anything here. # use_carrier can be set anytime. sysfs use_carrier $IF_BOND_USE_CARRIER # num_grat_arp can be set anytime. sysfs num_grat_arp $IF_BOND_NUM_GRAT_ARP # num_unsol_na can be set anytime. sysfs num_unsol_na $IF_BOND_NUM_UNSOL_NA # xmit_hash_policy can be set anytime. # Changing