Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#17612 - [initscripts] net: two different bonding modes

Attached to Project: Arch Linux
Opened by Daniel (dsf) - Saturday, 26 December 2009, 22:37 GMT
Last edited by Tom Gundersen (tomegun) - Sunday, 08 May 2011, 13:01 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Aaron Griffin (phrakture)
Thomas B├Ąchler (brain0)
Roman Kyrylych (Romashka)
Tom Gundersen (tomegun)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

The Problem:
2 network bondes like: bond0 with eth0 and eth1 in mode active-backup
bond1 with eth2 and eth3 in mode round-robin

modprobe.conf file:
options bonding max_bonds=2
alias bond0 bonding
options bond0 mode=1 miimon=100
alias bond1 bonding
options bond1 mode=0 miimon=50

Always assume in two bonds the mode active-backup!!

Additional info:
Package initscripts

* package version(s)
* config and/or log files etc.


Steps to reproduce:
like explain in Description.


The Solution: ( if you agree with fix include in next package release)

File MODPROBE.CONF
options bonding max_bonds=2
alias bond0 bonding
alias bond1 bonding

File /etc/conf.d/bonding ( with + what i added )
add variables like:
bond_bond0="eth0 eth1"
+ mode_bond0="1"
+ miimon_bond0="100"
bond_bond1="eth2 eth3"
+ mode_bond1="0"
+ miimon_bond1="50"
BOND_INTERFACES=(bond0 bond1)

File /etc/rc.d/network ( 2 Functions Changed ) ( with + what i added )
Function bond_up:

for ifline in ${BOND_INTERFACES[@]}; do
if [ "$ifline" = "${ifline#!}" ]; then
eval bondcfg="\$bond_${ifline}"
+ eval bondmode="\$mode_${ifline}"
+ eval bondmon="\$miimon_${ifline}"
if [ -n "${bondcfg}" ]; then
/sbin/ifenslave $ifline $bondcfg || error=1
fi
+ if [ -n "${bondmode}" && -n "${bondmon}" ]; then
+ /sbin/ifconfig $ifline down || error=1
+ /bin/echo $bondmode > /sys/class/net/$ifline/bonding/mode || error=1
+ /bin/echo $bondmon > /sys/class/net/$ifline/bonding/miimon || error=1
+ /sbin/ifconfig $ifline up || error=1
+ fi
fi
done

This works fine for me let me know if you need more details!!!!
This task depends upon

Closed by  Tom Gundersen (tomegun)
Sunday, 08 May 2011, 13:01 GMT
Reason for closing:  No response
Comment by smallcms (smallcms) - Tuesday, 05 January 2010, 11:13 GMT
This not work for me in 2.6.32
Comment by Daniel (dsf) - Tuesday, 05 January 2010, 12:56 GMT
smallcms can you publish the contents of files:
/etc/modprobe.conf
/etc/conf.d/bonding
/etc/rc.d/network

Thanks, dsf
Comment by smallcms (smallcms) - Thursday, 11 February 2010, 12:43 GMT
I'm sorry. This now work for me to. (Bug was on raid disk, while PC boot from another/old kernel).
I have some notice in
+ if [ -n "${bondmode}" && -n "${bondmon}" ]; then
and i changed this to
+ if [ -n "${bondmode}" ] && [ -n "${bondmon}" ]; then
my modprobe.conf located in /etc/modprobe.d/modprobe.conf
Many thanks anyway!
Comment by Tom Gundersen (tomegun) - Wednesday, 27 April 2011, 10:18 GMT
We are considering limiting the scope of the network initscript to not include this usecase. Is there any reason you cannot use netcfg instead?

Loading...