Bug 491009 - ifup leaves interface down if link is down, but only for non-static interfaces
Summary: ifup leaves interface down if link is down, but only for non-static interfaces
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 12
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 516998 554353
TreeView+ depends on / blocked
 
Reported: 2009-03-18 21:27 UTC by Bill Nottingham
Modified: 2014-03-17 03:17 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 462013
: 554353 (view as bug list)
Environment:
Last Closed: 2010-01-19 20:02:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bill Nottingham 2009-03-18 21:27:10 UTC
+++ This bug was initially created as a clone of Bug #462013 +++

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1

/etc/sysconfig/network-scripts/ifup-eth has this:

if [ -n "${DYNCONFIG} -a -x /sbin/dhclient ]; then
...
if check_link_down ${DEVICE}; then
   echo $" failed; no link present.  Check cable?"
   ip link set dev ${DEVICE} down >/dev/null 2>&1
   exit 1
fi

The problem with this is that for DHCP assigned interfaces, if you do an "ifup ethX" or "service network restart" while the ethernet cable is physically unplugged, or something else at the L2 switch took the link down, then at the end of this, your ethX interface is left down.

As a result, there is no irq handler registered in the NIC driver, and the NIC is left disabled. Then later when the link does come up and the NIC is in a position to report the new link state to the driver, either via an interrupt or via watchdog polling by the driver, the driver is not ready for it.

Also, this behaviour is different if the interface is statically administered, where the interface is correctly left up even if there is no link when "ifup ethX" is executed, so that it can receive those link up interrupts and/or do the polling of the link state in the driver.

This behaviour seems to have been around since RH9 days in the initscripts, and I believe this is broken behaviour.

Thanks.

Reproducible: Always

Steps to Reproduce:
1. Configure eth0 for DHCP
2. Disconnect ethernet cable
3. service network restart or ifup eth0

Comment 1 iarly selbir 2009-03-19 21:07:33 UTC
Triaged.

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 2 Bill Nottingham 2009-03-20 21:12:10 UTC
Note that dhclient, when it fails, also downs the interface.

Comment 3 Bug Zapper 2009-06-09 12:22:55 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Karel Volný 2010-01-11 14:05:39 UTC
updating version to F12, as I see the code hasn't changed since the original report except for the addition of PERSISTENT_DHCLIENT condition, but this variable doesn't seem to be defined anywhere (?) and so the behaviour should be the same

Comment 5 Bill Nottingham 2010-01-11 17:22:56 UTC
Yeah, the question is whether the inconsistent behavior is worth fixing and having as a behavior change.

Comment 6 Bill Nottingham 2010-01-19 20:02:46 UTC
Added, will be in 9.05-1.

http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=ee20f9d85bb56b88306ac6da5471bc3a2291d2cc

Likely won't be backported to prior releases, as it is a behavior change, after all.


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