Bug 1332678 - Udev should have logic to deal with situations where multiple devices have the same name.
Summary: Udev should have logic to deal with situations where multiple devices have th...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: systemd-maint
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 1298243 1420851
TreeView+ depends on / blocked
 
Reported: 2016-05-03 18:20 UTC by Jeremy
Modified: 2019-10-10 12:02 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-20 19:27:16 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Jeremy 2016-05-03 18:20:17 UTC
Description of problem:


The problem is that the bios for this machine is sending the same info for EVERY embedded device, see below for the output of udev to see the value of eno1 is being seen on each device. Unfortunately, there is no way to tell udev to use option 2 naming by default, so this makes the 1st embedded device to be named eno1, but every other interface will fail option 1-3 and end up being named the old standard eth0, eth1...

I've made a bit of a hack to my udev rules in order to ensure that the 2nd rule is used to name our interfaces, although this should not be necessary. I would like to see the bios remove it's interface naming so that udev uses rule 2 by default, much like many of our other SM hardware works.


output: Showing the BIOS sending name of eno1 to the kernel for each interface
[root@fdi ~]# udevadm info /sys/class/net/enp132s0f0 |grep ONBOARD
E: ID_NET_NAME_ONBOARD=eno1
[root@fdi ~]# udevadm info /sys/class/net/enp132s0f1 |grep ONBOARD
E: ID_NET_NAME_ONBOARD=eno1
[root@fdi ~]# udevadm info /sys/class/net/enp5s0f0 |grep ONBOARD
E: ID_NET_NAME_ONBOARD=eno1
[root@fdi ~]# udevadm info /sys/class/net/enp5s0f1 |grep ONBOARD
E: ID_NET_NAME_ONBOARD=eno1

output: current udev rules showing it using the ONBOARD name if it exists
[root@fdi ~]# cat /usr/lib/udev/rules.d/80-net-name-slot.rules 
# do not edit this file, it will be overwritten on update

ACTION!="add", GOTO="net_name_slot_end"
SUBSYSTEM!="net", GOTO="net_name_slot_end"
NAME!="", GOTO="net_name_slot_end"

IMPORT{cmdline}="net.ifnames"
ENV{net.ifnames}=="0", GOTO="net_name_slot_end"

NAME=="", ENV{ID_NET_NAME_ONBOARD}!="", NAME="$env{ID_NET_NAME_ONBOARD}"
NAME=="", ENV{ID_NET_NAME_SLOT}!="", NAME="$env{ID_NET_NAME_SLOT}"
NAME=="", ENV{ID_NET_NAME_PATH}!="", NAME="$env{ID_NET_NAME_PATH}"

LABEL="net_name_slot_end"


output: my hack to the ruleset to ensure that ONBOARD is skipped (I copied the rule into the "user" ruleset locale in etc, named it w/ a lower priority so that it is parsed before the built-in ruleset, and commented out the 1st rule)
[root@fdi ~]# cat /etc/udev/rules.d/79-ctl-net-name-slot.rules
# do not edit this file, it will be overwritten on update

ACTION!="add", GOTO="net_name_slot_end"
SUBSYSTEM!="net", GOTO="net_name_slot_end"
NAME!="", GOTO="net_name_slot_end"

IMPORT{cmdline}="net.ifnames"
ENV{net.ifnames}=="0", GOTO="net_name_slot_end"

# jmdiel - disable due to SM hardware supplying eno1 for every embedded nic
#NAME=="", ENV{ID_NET_NAME_ONBOARD}!="", NAME="$env{ID_NET_NAME_ONBOARD}"
NAME=="", ENV{ID_NET_NAME_SLOT}!="", NAME="$env{ID_NET_NAME_SLOT}"
NAME=="", ENV{ID_NET_NAME_PATH}!="", NAME="$env{ID_NET_NAME_PATH}"

LABEL="net_name_slot_end"


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


How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Michal Sekletar 2016-07-19 11:48:16 UTC
Sorry, I've missed this bug because in RHEL7 udev is part of systemd package. Not sure if we can disable filling bugs against udev component for RHEL7.

To make 2nd naming scheme default, please copy rule file (80-net-name-slot.rules) to /etc/udev/rules.d/ and leave first option commented out. udev will see there are two files with same file name and it will use one from /etc because local admin configuration always wins over config provided by rpm package. IIRC, this is documented in RHEL 7 Network Administration Guide.

Comment 5 Kyle Walker 2019-06-20 19:27:16 UTC
Due to the originating case being closed for an extended period of time, and no further reports of this behaviour, I am closing this bug at this time in order to focus our efforts on higher priority issues.

Please reopen if a further occurrence is encountered.


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