Bug 220525 - not all enslaved devices are removed in 'ifdown bond0'
Summary: not all enslaved devices are removed in 'ifdown bond0'
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-12-21 22:07 UTC by Andy Gospodarek
Modified: 2014-06-29 22:58 UTC (History)
2 users (show)

Fixed In Version: RC
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-02-08 01:58:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
possible patch (1008 bytes, patch)
2006-12-21 22:08 UTC, Andy Gospodarek
no flags Details | Diff
ifdown failure debug (17.76 KB, text/plain)
2006-12-21 22:09 UTC, Andy Gospodarek
no flags Details
ifdown debug with attached patch (13.50 KB, patch)
2006-12-21 22:10 UTC, Andy Gospodarek
no flags Details | Diff
shorter diff (812 bytes, patch)
2007-01-04 21:41 UTC, Bill Nottingham
no flags Details | Diff
better patch (827 bytes, patch)
2007-01-04 21:47 UTC, Bill Nottingham
no flags Details | Diff
patch. tested! (827 bytes, patch)
2007-01-04 21:49 UTC, Bill Nottingham
no flags Details | Diff

Description Andy Gospodarek 2006-12-21 22:07:32 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.0.8) Gecko/20061025 Firefox/1.5.0.8

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 <dzickus> [2.6.18-1.2910.el5]
- bonding: Don't release slaves when master is admin down (Herbert Xu ) [215887]

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):


How reproducible:
Always


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

Actual Results:
You will notice that only the first slave will be removed from the bond.  

Expected Results:
All slave devices are removed from the bond.

Additional info:
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.

Comment 1 Andy Gospodarek 2006-12-21 22:08:55 UTC
Created attachment 144225 [details]
possible patch

quick patch that worked for me

Comment 2 Andy Gospodarek 2006-12-21 22:09:47 UTC
Created attachment 144226 [details]
ifdown failure debug

Comment 3 Andy Gospodarek 2006-12-21 22:10:43 UTC
Created attachment 144227 [details]
ifdown debug with attached patch

Comment 4 RHEL Program Management 2006-12-21 22:20:42 UTC
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
inclusion.

Comment 5 Bill Nottingham 2007-01-04 21:41:15 UTC
Created attachment 144847 [details]
shorter diff

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.

Comment 6 Andy Gospodarek 2007-01-04 21:45:17 UTC
I'll test it tomorrow morning to be sure, but I like it.

Comment 7 Bill Nottingham 2007-01-04 21:47:20 UTC
Created attachment 144848 [details]
better patch

This makes it abundantly clear what we're doing here, at the expense of
breaking indentation.

Comment 8 Bill Nottingham 2007-01-04 21:49:46 UTC
Created attachment 144849 [details]
patch. tested!

Whoops.

Comment 9 Andy Gospodarek 2007-01-04 22:34:38 UTC
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.

Comment 10 Bill Nottingham 2007-01-05 01:24:19 UTC
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.

Comment 11 Jay Turner 2007-01-08 14:34:57 UTC
QE ack for RHEL5.

Comment 12 RHEL Program Management 2007-02-08 01:58:52 UTC
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.



Note You need to log in before you can comment on or make changes to this bug.