Bug 132839 - ifup dies horrid death if a ifcfg-eth* exists but device doesn't.
Summary: ifup dies horrid death if a ifcfg-eth* exists but device doesn't.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
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: 2004-09-17 18:17 UTC by Valdis Kletnieks
Modified: 2014-03-17 02:48 UTC (History)
1 user (show)

Fixed In Version: 7.82-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-17 20:40:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch to make ifup skip defined but nonexistent devices (985 bytes, patch)
2004-09-17 18:18 UTC, Valdis Kletnieks
no flags Details | Diff
better patch (1.37 KB, patch)
2004-09-17 20:40 UTC, Bill Nottingham
no flags Details | Diff

Description Valdis Kletnieks 2004-09-17 18:17:20 UTC
Description of problem:
ifup gets confused if you have an ifcfg-eth? script for a device that
isn't in the actual hardware configuration.  This is actually a
reasonable situation - I have ifcfg-eth3 and ifcfg-eth4 scripts for
two docking stations I often plug my laptop into.  The basic problem
is that in network-functions, the 'is_available' function gets
confused if it goes looking for a $HWADDR that doesn't exist, and we
end up calling 'rename_device eth3 eth0' or similar foolishness.

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

How reproducible:
Define some ifcfg-eth? for non-existent devices and set ONBOOT=YES
for them.

Steps to Reproduce:
1.
2.
3.
  
Actual results:
System hangs after several calls to rename_device with bad parameters.

Expected results:
Skip the interfaces that don't actually exist.

Additional info:
I've attached a patch against ifup and network-functions.

Comment 1 Valdis Kletnieks 2004-09-17 18:18:46 UTC
Created attachment 103960 [details]
Patch to make ifup skip defined but nonexistent devices

Comment 2 Valdis Kletnieks 2004-09-17 18:25:22 UTC
The fact that the system hangs after rename_device gets called several
times with bad parameters (invoking /sbin/nameif and creating several
'dev$RANDOM' interfaces) is a separate kernel bug I'll file once I
track the exact details down (possibly on the lkml and/or linux-netdev
lists, as I'm running a -mm kernel).

Comment 3 Bill Nottingham 2004-09-17 20:32:53 UTC
Surely you want -z, not -n?

Comment 4 Bill Nottingham 2004-09-17 20:40:08 UTC
Created attachment 103966 [details]
better patch

This is what's going into 7.82-1.

Comment 5 Valdis Kletnieks 2004-09-17 20:55:14 UTC
OK.. I can live with your patch,it fixes the problem too.. I'll
let somebody else decide whether or not we want the echo that
says "Device not found" (certainly makes it easier to debug if
you see the FAILED during system boot, as you have at least a
wild guess where to look)...

Comment 6 Bill Nottingham 2004-09-17 21:19:41 UTC
It should fall through to the:

echo $"$alias device ${DEVICE} does not seem to be present, delaying
initialization."

case. Unless there's no modprobe.conf entry, then it will fail silently.


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