Bug 973179 - biosdevname not applied during installation (after switchroot) for devices not used in initramfs (ie not having ifcfg file with DEVICE?)
Summary: biosdevname not applied during installation (after switchroot) for devices no...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-11 12:31 UTC by Radek Vykydal
Modified: 2014-06-09 11:20 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-09 11:20:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
journal wit log-priority=debug (1.76 MB, text/x-log)
2013-06-11 12:31 UTC, Radek Vykydal
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 927908 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Bugzilla 965718 0 unspecified CLOSED what to do with biosdevname in anaconda & @core, re: https://fedoraproject.org/wiki/Features/SystemdPredictableNetworkIn... 2021-02-22 00:41:40 UTC

Internal Links: 927908 965718

Description Radek Vykydal 2013-06-11 12:31:02 UTC
Created attachment 759604 [details]
journal wit log-priority=debug

Netinstall, 3 network devices, only one (em1) has link.

From journal:

initramfs

Jun 10 12:24:31 localhost systemd-udevd[315]: renamed netif to 'em1'
Jun 10 12:24:31 localhost systemd-udevd[315]: renamed network interface eth0 to em1
Jun 10 12:24:31 localhost systemd-udevd[310]: renamed netif to 'p3p1'
Jun 10 12:24:31 localhost systemd-udevd[310]: renamed network interface eth0 to p3p1
Jun 10 12:24:43 localhost systemd-udevd[373]: renamed network interface eth1 to p3p2
Jun 10 12:24:43 localhost systemd-udevd[373]: renamed netif to 'p3p2'

switchroot

Jun 10 12:24:59 gasoline.anaconda.englab.brq.redhat.com englab.brq.redhat.com br systemd-udevd[738]: '/lib/udev/rename_device' [754] exit with return code 0
Jun 10 12:24:59 gasoline.anaconda.englab.brq.redhat.com englab.brq.redhat.com br systemd-udevd[739]: '/lib/udev/rename_device'(out) 'em1'
Jun 10 12:24:59 gasoline.anaconda.englab.brq.redhat.com englab.brq.redhat.com br systemd-udevd[739]: '/lib/udev/rename_device' [758] exit with return code 0
Jun 10 12:24:59 gasoline.anaconda.englab.brq.redhat.com englab.brq.redhat.com br systemd-udevd[736]: '/lib/udev/rename_device' [753] exit with return code 0
Jun 10 12:24:59 gasoline.anaconda.englab.brq.redhat.com englab.brq.redhat.com br systemd-udevd[738]: renamed network interface p3p2 to ens3f1
Jun 10 12:24:59 gasoline.anaconda.englab.brq.redhat.com englab.brq.redhat.com br systemd-udevd[736]: renamed network interface p3p1 to ens3f0

One of the devices - em1/enp63s0 is activated in initramfs and therefore ifcfg file (ifcfg-em1 containing DEVICE=em1) is created.

ifcfg-em1:
# Generated by dracut initrd
DEVICE="em1"
ONBOOT=yes
NETBOOT=yes
UUID="c032d129-1904-4df0-8bfe-10d3b1c1b543"
BOOTPROTO=dhcp
HWADDR="f4:ce:46:2c:44:7a"
TYPE=Ethernet
NAME="em1"


For the two remaining - p3p1/ens3f0, p3p2/ens3f1 - ifcfg files (ifcfg-ens3fX, with NO DEVICE= line) are created after switch root in anaconda (the devices are not named by biosdevname)

ifcfg-ens3f1:
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=ens3f0
UUID=47b9e38e-726c-45fe-b0b9-d30bad0af4d4
ONBOOT=no
HWADDR=00:15:17:96:75:0A
PEERDNS=yes
PEERROUTES=yes

(I will attach journalctl and output of udevadm test for network devices.)

So after switchroot, in anaconda, devcices are named em1, ens3f1, ens3f0.
After reboot, the devices would be renamed using biosdevname (em1, p3p1, p3p2).
Seems that for the em1 case only initscript's 60-net.rules (renaming device to DEVICE from ifcfg) prevents changing device name to enp63c0 later (by 80-net-name-slot.rules), which is not the case for the other two devices. Without creating ifcfg-em1 in initramfs em1 would be ranamed too during installation after switchroot:

Jun 10 13:05:21 localhost systemd-udevd[322]: renamed netif to 'em1'
Jun 10 13:05:21 localhost systemd-udevd[322]: renamed network interface eth0 to em1
Jun 10 13:05:21 localhost systemd-udevd[322]: renamed netif to 'p3p1'
Jun 10 13:05:21 localhost systemd-udevd[322]: renamed network interface eth0 to p3p1
Jun 10 13:05:34 localhost systemd-udevd[378]: renamed netif to 'p3p2'
Jun 10 13:05:34 localhost systemd-udevd[378]: renamed network interface eth1 to p3p2

Jun 10 13:06:03 localhost systemd-udevd[661]: PROGRAM '/lib/udev/rename_device' /usr/lib/udev/rules.d/60-net.rules:1
Jun 10 13:06:05 localhost systemd-udevd[673]: renamed network interface em1 to enp63s0
Jun 10 13:06:07 localhost systemd-udevd[661]: renamed network interface p3p2 to ens3f1
Jun 10 13:06:07 localhost systemd-udevd[680]: renamed network interface p3p1 to ens3f0

So if we don't take into account 60-net.rules (ie when ifcfg file with DEVICE=em1 is not created in intramfs), it seems that after switchroot 80-net-name-slot.rules is triggered and it renames devices to en* which would (?) be prevented if the devices had been named by 71-biosdevname (NAME!="", GOTO="net_name_slot_end")?

Comment 1 Radek Vykydal 2013-06-11 12:47:36 UTC
Michal would you have any ideas why 80-net-name-slot.rules and not 71-biosdevname.rules is used after switch root in installer? Or debugging tips?

Comment 2 Radek Vykydal 2013-08-27 14:43:07 UTC
This got complicated (currently not reproducible in F20/master) by adding new systemd renaming in initramfs (bug 972662) which doesn't seem to quite work - bug 988766 that should be fixed first.

Comment 3 Radek Vykydal 2013-09-04 08:38:04 UTC
(In reply to Radek Vykydal from comment #2)
> This got complicated (currently not reproducible in F20/master) by adding
> new systemd renaming in initramfs (bug 972662) which doesn't seem to quite
> work - bug 988766 that should be fixed first.

The 988766 seem to be fixed and I am no longer to reproduce the issue of this bz. Seems to be fixed as well.

Comment 4 Michal Schmidt 2014-06-09 11:17:10 UTC
(In reply to Radek Vykydal from comment #1)
> Michal would you have any ideas why 80-net-name-slot.rules and not
> 71-biosdevname.rules is used after switch root in installer? Or debugging
> tips?

I have no idea.
As for tips on debugging udev rules, all I know is the kernel command line options documented in man systemd-udevd, and udevadm info.


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