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#11781 - [initscripts] net: NIC bonding does not work when using dhcp

Attached to Project: Arch Linux
Opened by Joern Koerner (jko) - Friday, 17 October 2008, 09:04 GMT
Last edited by Tom Gundersen (tomegun) - Saturday, 04 June 2011, 18:16 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 Low
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
When using NIC bonding (ifenslave) and configuring it to fetch the ipaddress via dhcp the bond0 device does not get an ip: timed out.

This is a bug in /etc/rc.d/network script.
Anyway there seems no way to reconfigure a bonding device wirh network restart . bond_down simply does not exists...

Additional info:
* initscripts 2008.09-2


Steps to reproduce:
Set up a bonding device as described in http://wiki.archlinux.org/index.php/Configuring_network#bonding
and in /etc/rc.conf say
...
bond0="dhcp"
...


Resolution:
I've reworked the /etc/rc.d/network script a little bit.
1. Moved bond_up right after bridge_up and before "#bring up ethernet interfaces"
2. Modified bond_up() function:
bond_up()
{
for ifline in ${BOND_INTERFACES[@]}; do
if [ "$ifline" = "${ifline#!}" ]; then
eval bondcfg="\$bond_${ifline}"
for ifl in ${bondcfg}; do
/sbin/ifconfig $ifl up
done
/sbin/ifconfig $ifline up
/sbin/ifenslave $ifline $bondcfg || error=1
fi
done
}



Complete working /etc/rc.d/network is attached.

   network (4.7 KiB)
This task depends upon

Closed by  Tom Gundersen (tomegun)
Saturday, 04 June 2011, 18:16 GMT
Reason for closing:  No response
Additional comments about closing:  Use (or file a bug against) netcfg.
Comment by Jan de Groot (JGC) - Friday, 17 October 2008, 09:14 GMT
Is this related to  FS#11761 ?
Comment by Joern Koerner (jko) - Friday, 17 October 2008, 10:02 GMT
No. It is totally independent from #11761

The problem with unmodified network script it basically that ifup bond0 will be called before the bonding has been created - which will fail.
Then after the first network startup failed and you retry to start network it will work because now the bonding (ifenslave bond0 eth0 eth1) is correctly set up and the second ifup bond0 call will work.
Comment by Dan McGee (toofishes) - Thursday, 04 December 2008, 13:57 GMT
Appears like we can fix the initscripts to address this. Thanks for the patch. Aaron or Thomas, you want to get this in there?
Comment by Joern Koerner (jko) - Friday, 05 December 2008, 21:50 GMT
...
sorry, but by the way - a very similar bug appears when using bridged networks. I had no time yet to figure out a valid resolution but it seems to be very similar. Since I cannot reproduce the bug right now I'll create a new one once I've some more details.

Best,
Joern
Comment by Paul Mattal (paul) - Wednesday, 06 January 2010, 05:27 GMT
Woah, this one has taken a long hiatus (over a year now).

Thanks to the marvels of git, I created a patch from the network script provided against 2008.09-2, and ported it to the git head, though I had to manually resolve some conflicts in bond_up().

Can someone look at this patch, test it, and decide whether we should apply it? It seems pretty minimal.
Comment by Paul Mattal (paul) - Saturday, 06 February 2010, 13:57 GMT
Can someone merge this patch? Or is there a reason not to do so?
Comment by Thomas Bächler (brain0) - Saturday, 06 February 2010, 16:28 GMT
The reason is that I never got to review it. If it's fine, then merge it.

However, I'd much rather not have advanced networking implemented in initscripts, but rather removed and implemented in netcfg (I recently implemented bridging in netcfg, but haven't submitted it yet, someone should do bonding as well).
Comment by Jesse Young (jlyo) - Tuesday, 02 November 2010, 23:38 GMT
FYI: Thomas Jost has submitted patches for bonding in netcfg in  FS#21490 .
Comment by Glenn Matthys (RedShift) - Monday, 15 November 2010, 11:06 GMT
What's the status of this issue?
Comment by Tom Wizetek (MajorTom) - Thursday, 18 November 2010, 05:06 GMT
I can confirm that the status has not changed. bond0="dhcp" doesn't currently work out of the box.
Comment by Tom Gundersen (tomegun) - Wednesday, 27 April 2011, 10:19 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...