Bug 672663

Summary: renames existing devices that already have configuration
Product: Red Hat Enterprise Linux 6 Reporter: Bill Nottingham <notting>
Component: biosdevnameAssignee: Harald Hoyer <harald>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team>
Severity: medium Docs Contact:
Priority: low    
Version: 6.1CC: borgan, harald, john_hull, jordan_hargrave, linux-bugs, matt_domsch, mebrown, mganisin, narendra_k, rvokal, shyam_iyer, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Because this version was not released, it does not affect anyone.
Story Points: ---
Clone Of: 669486 Environment:
Last Closed: 2011-05-19 13:49:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 669486    
Bug Blocks: 501533    

Description Bill Nottingham 2011-01-25 19:54:17 UTC
+++ This bug was initially created as a clone of Bug #669486 +++

Description of problem:

/etc/sysconfig/network-scripts/ifcfg-eth0:
# Network Interface
DEVICE=eth0
BOOTPROTO=dhcp
DEFROUTE=yes
IPV6INIT=no
ONBOOT=yes
TYPE=Ethernet
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
USERCTL=no
IPV4_FAILURE_FATAL=yes
NAME="System eth0"
HWADDR=00:26:2D:F4:FC:06
PEERDNS=yes
PEERROUTES=yes

/etc/udev/rules.d/70-persistent-net.rules:
# PCI device 0x8086:0x10ea (e1000e) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:26:2d:f4:fc:06", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

However, after booting:

2: em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:26:2d:f4:fc:06 brd ff:ff:ff:ff:ff:ff
    inet 10.11.231.95/22 brd 10.11.231.255 scope global em1

(NM coped with the device being different, but...)

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

biosdevname-0.3.4-1.fc15.x86_64
udev-164-6.fc15.x86_64

How reproducible:

100%, presumably. Just noticed now.

Steps to Reproduce:
1. ifconfig eth0
2. Hey, where'd my eth0 go?

--- Additional comment from matt_domsch on 2011-01-25 09:54:01 EST ---

I think this is a bug in the biosdevname.rules file.

The current rules skip over invoking biosdevname under these conditions:

SUBSYSTEM!="net", GOTO="netdevicename_end"
KERNEL!="eth*",   GOTO="netdevicename_end"
ACTION!="add",    GOTO="netdevicename_end"

I think we need to add:

NAME=="*", GOTO="netdevicename_end"

such that if another rule sets NAME, we don't invoke biosdevname.  I thought that's what was already happening, but somehow I missed including it.

--- Additional comment from matt_domsch on 2011-01-25 10:56:29 EST ---

That should be:

NAME=="?*", GOTO="netdevicename_end"

--- Additional comment from notting on 2011-01-25 12:55:50 EST ---

There's one side case that's not handled here - imagine an image-based deployment where the targeted machines only have a single type of ethernet (or a single ethernet device).

An image for this system would likely include interface configuration files that don't specify a hardware address (and therefore don't do specific mappings), but do specify a device name. Introduction of biosdevname into this scenario could/would break things.

That does, of course, assume they include biosdevname in their package set, which wouldn't happen on upgrade.

--- Additional comment from notting on 2011-01-25 12:57:05 EST ---

Completely random aside - the biosdevname rules, as system udev files, go in /lib/udev/rules.d, not /etc.

--- Additional comment from notting on 2011-01-25 13:05:02 EST ---

The suggested fix does solve the issue for me.

--- Additional comment from matt_domsch on 2011-01-25 13:28:18 EST ---

Thanks for the test Bill.  I've committed that change upstream.

I'm adding in packaging dump_pirq, so we can debug if necessary.

I'll move the rules to /lib/udev/rules.d also.  Odd, RHEL5 doesn't seem to have that directory...

--- Additional comment from notting on 2011-01-25 13:45:00 EST ---

RHEL 5 has frighteningly old udev, alas.

Comment 1 Matt Domsch 2011-01-25 21:08:27 UTC
biosdevname-0.3.6 is built for F15 now, and should be built for EL6 to resolve this.

F15 build:

Task Info: http://koji.fedoraproject.org/koji/taskinfo?taskID=2742285
Build Info: http://koji.fedoraproject.org/koji/buildinfo?buildID=215600

Comment 4 Harald Hoyer 2011-02-16 15:03:23 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Because this version was not released, it does not affect anyone.

Comment 6 errata-xmlrpc 2011-05-19 13:49:47 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0644.html