Red Hat Bugzilla – Bug 220525
not all enslaved devices are removed in 'ifdown bond0'
Last modified: 2014-06-29 18:58:06 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:18.104.22.168) Gecko/20061025 Firefox/22.214.171.124
Description of problem:
After seening Herbert Xu's patch on rhkl to change the fact that all slave devices are not removed when a bonded inteface is taken down:
* Sun Dec 17 2006 Don Zickus <email@example.com> [2.6.18-1.2910.el5]
- bonding: Don't release slaves when master is admin down (Herbert Xu ) 
I tested bonding with the latest initscripts to see if there were any lingering issues. Turns out there are.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Set BONDING_OPTS="mode=0 miimon=100" in ifcfg-bond0
2. Add at least 2 interfaces to the bond.
3. After interfaces are up, do an ifdown bond0
You will notice that only the first slave will be removed from the bond.
All slave devices are removed from the bond.
This happens because checking ifdown-eth looks at the slaves mac address and assumes that the macs are correct and the ifcfg files are wrong and does an ifdown on the first active slave over and over.
Created attachment 144225 [details]
quick patch that worked for me
Created attachment 144226 [details]
ifdown failure debug
Created attachment 144227 [details]
ifdown debug with attached patch
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release. Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release. This request is not yet committed for
Created attachment 144847 [details]
Here's a shorter diff that works for me - does it work for you?
Note that without this, just doing (for example) 'ifdown eth1' will fail too.
I'll test it tomorrow morning to be sure, but I like it.
Created attachment 144848 [details]
This makes it abundantly clear what we're doing here, at the expense of
Created attachment 144849 [details]
Does that work when the MAC gets changed since the bond gives each slave it's
MAC? That was the original reason why the old check wasn't working on my system.
Basically, what it does is skip the MAC check entirely when bringing down any
interface that's a bonding slave (has SLAVE set to 'yes' and has a MASTER set.)
The only situation where something odd could happen is if you have slaves that
aren't actually defined in the configuration as such - of course, that case
can't really work right anyway (and is somewhat nonsensical.)
Raising as blocker, since it's a regression.
Short summary: detaching bond slaves whether via 'ifdown <bonding device>' or
'ifdown <slave device>' doesn't work right.
Patch has been tested and resolves it for the reproducer provided.
Risk to non-bonding configurations: none.
Risk to bonding configurations: should be none - at worst, a case that's already
broken may still be broken.
Built in 8.45.13.EL-1.
QE ack for RHEL5.
A package has been built which should help the problem described in
this bug report. This report is therefore being closed with a resolution
of CURRENTRELEASE. You may reopen this bug report if the solution does
not work for you.