Bug 1310672 - Custom udev rules not renaming interfaces as expected - /etc/udev/rules.d/71-net-mrf.rules [NEEDINFO]
Custom udev rules not renaming interfaces as expected - /etc/udev/rules.d/71-...
Status: CLOSED INSUFFICIENT_DATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: biosdevname (Show other bugs)
6.4
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Michal Sekletar
Release Test Team
: Reopened
Depends On:
Blocks: 1269194 1356047
  Show dependency treegraph
 
Reported: 2016-02-22 08:41 EST by Fani Orestiadou
Modified: 2016-08-12 14:25 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-12 14:25:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
msekleta: needinfo? (forestia)


Attachments (Terms of Use)
Sosreports after the suggested changes of udev rules (3.25 MB, application/zip)
2016-03-01 03:09 EST, Fani Orestiadou
no flags Details
traces level "debug" /etc/udev/udev.conf (48.36 KB, image/jpeg)
2016-03-01 03:11 EST, Fani Orestiadou
no flags Details
Sosreport with devug packages installed (2.01 MB, application/x-xz)
2016-04-05 09:27 EDT, Fani Orestiadou
no flags Details

  None (edit)
Description Fani Orestiadou 2016-02-22 08:41:48 EST
Description of problem: Udev rules are created to rename the interfaces, but one of them stays "renameX" instead of "ethX"


Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux Server release 6.4
2.6.32-358.28.1.el6.x86_64

How reproducible: After reboot but issue disappears after power cycle


Actual results:
DMSEG output
udev: renamed network interface eth2 to rename4
udev: renamed network interface eth1 to rename3
udev: renamed network interface eth0 to rename2
udev: renamed network interface eth8 to rename10
udev: renamed network interface eth9 to rename11
udev: renamed network interface eth1 to eth2
udev: renamed network interface eth0 to eth10
udev: renamed network interface rename10 to eth0
udev: renamed network interface rename11 to eth1
udev: renamed network interface eth4 to rename6 <---
udev: renamed network interface eth7 to eth8
udev: renamed network interface eth6 to eth9
udev: renamed network interface rename4 to eth7
udev: renamed network interface rename2 to eth4
udev: renamed network interface eth5 to eth6 <---
udev: renamed network interface rename3 to eth5


Expected results:
udev: renamed network interface eth2 to rename4
udev: renamed network interface eth1 to rename3
udev: renamed network interface eth0 to rename2
udev: renamed network interface eth8 to eth10
udev: renamed network interface eth5 to eth11
udev: renamed network interface eth7 to eth8
udev: renamed network interface rename4 to eth7
udev: renamed network interface eth4 to rename6 
udev: renamed network interface rename3 to eth5
udev: renamed network interface rename2 to eth4
udev: renamed network interface eth6 to eth9
udev: renamed network interface rename6 to eth6

Additional info:

Udev rules

$ cat etc/udev/rules.d/71-net-mrf.rules 
# IP Network Device Naming Rules for MRF

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

# Check for model types of MRF that require net device remapping
ATTR{[dmi/id]product_name}=="ProLiant DL380p Gen8", GOTO="dl380g8"
ATTR{[dmi/id]product_name}=="ProLiant DL380 G6",    GOTO="dl380g6"
GOTO="net_mrf_rules_end"

############################################
# ProLiant DL380 G6 RMS Shelf with 2 x NC365T
LABEL="dl380g6"
PROGRAM="/sbin/biosdevname -i %k",NAME="%c",OPTIONS+="string_escape=replace"

# Top-Down Left-Right

# Top    slot#1 (if any Emmerson board)
NAME=="p1p4",NAME="eth15"
NAME=="p1p3",NAME="eth14"
NAME=="p1p2",NAME="eth13"
NAME=="p1p1",NAME="eth12"

# Medium slot#2 (labs: may be empty)
NAME=="p2p4",NAME="eth7"
NAME=="p2p3",NAME="eth6"
NAME=="p2p2",NAME="eth5"
NAME=="p2p1",NAME="eth4"

# Bottom slot#3 (mandatory)
NAME=="p3p4",NAME="eth11"
NAME=="p3p3",NAME="eth10"
NAME=="p3p2",NAME="eth9"
NAME=="p3p1",NAME="eth8"

# Embedded in mother board
NAME=="em4",NAME="eth3"
NAME=="em3",NAME="eth2"
NAME=="em2",NAME="eth1"
NAME=="em1",NAME="eth0"

GOTO="net_mrf_rules_end"

############################################
# ProLiant DL380 Gen8 RMS Shelf
LABEL="dl380g8"
PROGRAM="/sbin/biosdevname -i %k",NAME="%c",OPTIONS+="string_escape=replace"

# Top-Down Left-Right

# Top    slot#1 (if any Emmerson board)
NAME=="p1p4",NAME="eth15"
NAME=="p1p3",NAME="eth14"
NAME=="p1p2",NAME="eth13"
NAME=="p1p1",NAME="eth12"

# Medium slot#2 (labs: may be empty)
NAME=="p2p4",NAME="eth3"
NAME=="p2p3",NAME="eth7"
NAME=="p2p2",NAME="eth5"
NAME=="p2p1",NAME="eth4"

# Bottom slot#3 (mandatory)
NAME=="p3p4",NAME="eth8"
NAME=="p3p3",NAME="eth9"
NAME=="p3p2",NAME="eth11"
NAME=="p3p1",NAME="eth6"

# Embedded in mother board
NAME=="em4",NAME="eth10"
NAME=="em3",NAME="eth2"
NAME=="em2",NAME="eth1"
NAME=="em1",NAME="eth0"

GOTO="net_mrf_rules_end"

############################################

LABEL="net_mrf_rules_end"
Comment 1 Harald Hoyer 2016-02-22 08:47:39 EST
reminds me of https://bugzilla.redhat.com/show_bug.cgi?id=1308420
Comment 2 Harald Hoyer 2016-02-22 08:49:29 EST
Well, general rule of thumb:
1. do not rename in the "eth*" namespace
2. if you do, you have to specify every interface, which will appear
3. don't forget to generate ifcfg-* files with HWADDR for every interface, which will appear
4. see 1.
Comment 4 Harald Hoyer 2016-02-22 09:19:33 EST
In essence: use "net[0-9]" and you will have no "rename*" problems
Comment 12 Fani Orestiadou 2016-03-01 03:09 EST
Created attachment 1131815 [details]
Sosreports after the suggested changes of udev rules
Comment 13 Fani Orestiadou 2016-03-01 03:11 EST
Created attachment 1131816 [details]
traces level "debug" /etc/udev/udev.conf
Comment 16 Harald Hoyer 2016-03-01 12:13:59 EST
(In reply to Fani Orestiadou from comment #13)
> Created attachment 1131816 [details]
> traces level "debug" /etc/udev/udev.conf

not very helpful
Comment 19 Harald Hoyer 2016-03-08 07:10:17 EST
In the error case, what is the output of:

# cd /sys/class/net
# for i in *; do biosdevname -i "$i";done
Comment 28 Fani Orestiadou 2016-04-05 09:27 EDT
Created attachment 1143842 [details]
Sosreport with devug packages installed
Comment 33 John Ruemker 2016-08-12 14:25:04 EDT
By my reading of the comments here and the case, we have narrowed down the issue to a problem in biosdevname, but we require additional input from the customer's reproduction of this issue in order to properly diagnose it.  The customer case has been closed due to inactivity, so we are not expecting any forthcoming details.  As such, I am closing this bug.  If there are any customers actively experiencing this issue, you may reopen the bug report with details.

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