Bug 462013 - 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 WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts
Version: 5.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: initscripts Maintenance Team
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-11 21:57 UTC by Bhavesh Davda
Modified: 2009-03-18 21:27 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 491009 (view as bug list)
Environment:
Last Closed: 2009-03-18 21:27:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Bhavesh Davda 2008-09-11 21:57:44 UTC
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 Bill Nottingham 2009-03-18 21:27:41 UTC
I'm cloning this bug for consideration for future major releases. Given that this is the behavior for a long time running, changing it in an update release would not be appropriate. Closing as WONTFIX for RHEL 5 and earlier.


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