Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 421757 - sys-apps/openrc-0.9.8.4 bonding options enumeration order
Summary: sys-apps/openrc-0.9.8.4 bonding options enumeration order
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard: openrc:oldnet
Keywords:
Depends on:
Blocks: 417391
  Show dependency tree
 
Reported: 2012-06-18 12:02 UTC by Lorand Kelemen
Modified: 2013-04-25 23:08 UTC (History)
0 users

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


Attachments
bonding.sh patch (bonding.sh.diff,1.16 KB, text/plain)
2012-06-18 12:02 UTC, Lorand Kelemen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lorand Kelemen 2012-06-18 12:02:29 UTC
Created attachment 315659 [details]
bonding.sh patch

We are using bonding usually with two interfaces with ARP or MII link monitoring mode. (The bonding driver is not modular.)

We have the following problem:

/lib/rc/net/bonding.sh configures the bond mode in a loop, then after that it tries to configure all other bonding options in the next loop.

This way the following simple config breaks, because miimon is activated after downdelay is set:

config_bond0="192.168.0.2 netmask 255.255.255.0"
slaves_bond0="eth1 eth2"
mode_bond0="active-backup"
miimon_bond0="1000"
updelay_bond0="3000"
downdelay_bond0="2000"
primary_bond0="eth2" 
rc_net_bond0_need="net.eth1 net.eth2"

# /etc/init.d/net.bond0 restart
 * Caching service dependencies ...                                                                                                                    [ ok ]
 * Stopping sshd ...                                                                                                                                   [ ok ]
 * Unmounting network filesystems ...                                                                                                                  [ ok ]
 * Bringing down interface bond0
 *   Removing slaves from bond0 ...
 *     eth1 eth2                                                                                                                                       [ ok ]
 * Bringing up interface bond0
 *   Setting mode: active-backup
 *   Setting downdelay: 2000
/lib64/rc/net/bonding.sh: line 72: echo: write error: Operation not permitted
 *   Failed to configure downdelay (downdelay_bond0)
 *   Setting miimon: 1000
 *   Setting updelay: 3000
 *   Adding slaves to bond0 ...
 *     eth1 eth2                                                                                                                                       [ ok ]
 *   192.168.0.2 ...                                                                                                                                   [ ok ]
#  * Starting sshd ...
 * Mounting network filesystems ... 

It would be advisable to handle the 'miimon' value as a separate value like the 'mode' value.

I attached a patch, please review it.
Comment 1 William Hubbs gentoo-dev 2012-10-17 18:53:14 UTC
This patch has been applied in commit f671e0a.
Thanks for the report and the fix.