Bug 132839 - ifup dies horrid death if a ifcfg-eth* exists but device doesn't.
ifup dies horrid death if a ifcfg-eth* exists but device doesn't.
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-17 14:17 EDT by Valdis Kletnieks
Modified: 2014-03-16 22:48 EDT (History)
1 user (show)

See Also:
Fixed In Version: 7.82-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-17 16:40:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Valdis Kletnieks 2004-09-17 14:17:20 EDT
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 14:18:46 EDT
Created attachment 103960 [details]
Patch to make ifup skip defined but nonexistent devices
Comment 2 Valdis Kletnieks 2004-09-17 14:25:22 EDT
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 16:32:53 EDT
Surely you want -z, not -n?
Comment 4 Bill Nottingham 2004-09-17 16:40:08 EDT
Created attachment 103966 [details]
better patch

This is what's going into 7.82-1.
Comment 5 Valdis Kletnieks 2004-09-17 16:55:14 EDT
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 17:19:41 EDT
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.