Bug 1003682 - biosdevname does not set NAME for ethernet interfaces with KERNEL!="eth*"
Summary: biosdevname does not set NAME for ethernet interfaces with KERNEL!="eth*"
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: biosdevname
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Praveen K Paladugu
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-02 17:25 UTC by Harald Hoyer
Modified: 2013-09-02 17:27 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-02 17:27:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Proposed patch (1.05 KB, patch)
2013-09-02 17:25 UTC, Harald Hoyer
no flags Details | Diff

Description Harald Hoyer 2013-09-02 17:25:40 UTC
Created attachment 792936 [details]
Proposed patch

During the bootup processes with an initramfs, udev triggers two times with ACTION=="add".

In the first run, biosdevname would set NAME="em1" for KERNEL=="eth0".
In the second run, biosdevname would not set NAME="em1", because KERNEL!="eth0".
Therefore NAME=="" and the default systemd-udevd net names would kick in.

Proposed udev rules, which fix this issue are:

SUBSYSTEM!="net", GOTO="netdevicename_end"
ACTION!="add",    GOTO="netdevicename_end"
NAME=="?*",       GOTO="netdevicename_end"
ATTR{type}!="1",  GOTO="netdevicename_end"
ENV{DEVTYPE}=="?*", GOTO="netdevicename_end"

# kernel command line "biosdevname={0|1}" can turn off/on biosdevname
IMPORT{cmdline}="biosdevname"
ENV{biosdevname}=="?*", ENV{UDEV_BIOSDEVNAME}="$env{biosdevname}"
# ENV{UDEV_BIOSDEVNAME} can be used for blacklist/whitelist
# but will be overwritten by the kernel command line argument
ENV{UDEV_BIOSDEVNAME}=="0", GOTO="netdevicename_end"
ENV{UDEV_BIOSDEVNAME}=="1", GOTO="netdevicename_start"

# uncomment the next line for biosdevname to be off by default
# GOTO="netdevicename_end"

LABEL="netdevicename_start"

# using NAME= instead of setting INTERFACE_NAME, so that persistent
# names aren't generated for these devices, they are "named" on each boot.
SUBSYSTEMS=="pci", PROGRAM="/sbin/biosdevname --policy physical -i %k", NAME="%c",  OPTIONS+="string_escape=replace"

LABEL="netdevicename_end"

Comment 1 Harald Hoyer 2013-09-02 17:26:38 UTC
RHEL bug 988766 hit this issue.

I built F20, rawhide and RHEL-7 packages with this patch.

Comment 2 Harald Hoyer 2013-09-02 17:27:41 UTC
Just FYI to fix this upstream.


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