Bug 75506 - network-functions: is_available should re-check device after modprobe
Summary: network-functions: is_available should re-check device after modprobe
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 8.0
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-09 09:21 UTC by Aleksey Nogin
Modified: 2014-03-17 02:31 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-01-14 05:23:39 UTC
Embargoed:


Attachments (Terms of Use)

Description Aleksey Nogin 2002-10-09 09:21:20 UTC
Description of Problem:

In /etc/sysconfig/network-scripts/network-functions, the is_available function
assumes that if modprobe succeeded, then the device must be available. When this
assumption is wrong, ifup keeps trying to bring up non-existing device which
takes time and prints lots of irrelevant error messages.

Version-Release number of selected component (if applicable):

initscripts-6.95-1

How Reproducible:

100%

Steps to Reproduce:
1. For my laptop, I have two eth interfaces that both use the same driver
(3c59x) - one built-in and on in a docking station. 
2. I have in the modules.conf:
alias eth0 3c59x
alias eth1 3c59x
3. When I am *not* plugged into docking station (and eth0 in present, but eth1
is not), I run "ifup eth1"

Actual Results: 

It takes several seconds to complete and prints a lot of ugly error messages. 

Expected Results:

Quickly figures device is just not there.

Additional Information:
	
The problem is that the is_available function in network-functions assumes that
if an alias in present in modules.conf and the modprobe succeeded, the device
must be present. As this example shows, in case of several devices using the
same module this is an incorrect assumption. Instead is_available should check
"ip -o link" again after the modprobe.

Comment 1 Jon DeSena 2002-11-04 16:14:19 UTC
See attached patch to bug #77267 for a solution to this.

Comment 2 Bill Nottingham 2003-01-14 05:23:39 UTC
Check after loading the module done in 7.03-1.

Comment 3 Aleksey Nogin 2003-01-15 02:05:34 UTC
Indeed, seems to work correctly with  7.03-1.

Minor issue, though - if I have two devices (eth0 and eth1) aliased to the same
module (3c59x), then on "ifup eth1" I get a message telling "3c59x device does
not seem to be present, delaying eth1 initialization". The messages is
inaccuratre - there is a 3c59x device present (eth0), it's just that there is
only one of them...

Comment 4 Bill Nottingham 2003-01-15 05:36:23 UTC
message reworded in CVS.


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