Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 332383 - sys-apps/openrc-0.6.1-r1 bonding: problem with setting/changing of mode when restarting
Summary: sys-apps/openrc-0.6.1-r1 bonding: problem with setting/changing of mode when ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords: InOverlay
Depends on:
Blocks:
 
Reported: 2010-08-12 05:42 UTC by Lutz Heermann
Modified: 2010-08-14 00:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Take bond completly down, when stopped. (bonding_down.patch,291 bytes, patch)
2010-08-12 05:47 UTC, Lutz Heermann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lutz Heermann 2010-08-12 05:42:37 UTC
When the mode of a bond is changed, and the bond is restarted after that, the new mode is not correctly set for the bond.

Error message:
/lib/rc/net/bonding.sh: line 48: echo: write error: Operation not permitted

The reason is, that the bond is taken down totally, when stopped.

Reproducible: Always

Steps to Reproduce:
1. Configure a bond in /etc/conf.d/net:
config_bond0="192.168.127.1/32"
mode_bond0="active-passive"
miimon_bond0="100"
slaves_bond0="eth2"

2. Start the bond and check mode
# /etc/init.d/net.bond0 start
# cat /sys/class/net/bond0/bonding/mode
active-backup 1

3. Stop the bond:
# /etc/init.d/net.bond0 stop

4. Change mode in /etc/conf.d/net:
mode_bond0="active-rr"

5. Start the bond and check mode
# /etc/init.d/net.bond0 start
# cat /sys/class/net/bond0/bonding/mode
active-backup 1
Actual Results:  
When the bond is started again, the mode is not changed and stays with the configuration of the first start.

Expected Results:  
The mode of bond should be configured to the settings in /etc/conf.d/net.
Comment 1 Lutz Heermann 2010-08-12 05:47:29 UTC
Created attachment 242525 [details, diff]
Take bond completly down, when stopped.

When using the sysfs interface for bonding, the best practice should be to set 'options bonding max_bonds=0' in /etc/modprobe.d/bond.conf.

This patch then takes a bond down and destroys it, when sysfs is used.
Comment 2 Anthony Basile gentoo-dev 2010-08-13 21:46:50 UTC
Looks good, we'll include it.  Thanks again for the patch.
Comment 3 Jory A. Pratt gentoo-dev 2010-08-14 00:32:08 UTC
(In reply to comment #2)
> Looks good, we'll include it.  Thanks again for the patch.
> 

Closing as it is already commited in our overlay, please check next release which will happen later this week to ensure problem is resolved, as always if it is not please reopen the bug.