FS#33923 - [dhcpcd] Interface names change between install disk and initial boot
Attached to Project:
Arch Linux
Opened by Skye Berghel (sberghel) - Tuesday, 19 February 2013, 07:05 GMT
Last edited by Dave Reisner (falconindy) - Tuesday, 30 July 2013, 11:25 GMT
Opened by Skye Berghel (sberghel) - Tuesday, 19 February 2013, 07:05 GMT
Last edited by Dave Reisner (falconindy) - Tuesday, 30 July 2013, 11:25 GMT
|
Details
Description:
Interface names change between install disk and initial boot. When I was installing Arch with the install disk, ip addr showed that I had two devices, lo and eth0. When I rebooted into my new system, ip addr showed that I had two devices, lo and enp3s0. According to the Beginner's Guide, "From systemd-197's release and onward, udev now assigns predictable, stable network interface names that deviate from the legacy incremental naming scheme (wlan0, wlan1, etc.). These interface names are guaranteed to be persistent across reboots, which solves the problem of the lack of predictability of network interface name assignment." "Persistent across reboots" means "when you reboot, the name will not change". This did not happen. The name changed. Additional info: Steps to reproduce: (1) Take an Arch Linux CD (I used the latest one, 2013.02.01) (2) ip addr (3) Install and reboot. (4) ip addr |
This task depends upon
Closed by Dave Reisner (falconindy)
Tuesday, 30 July 2013, 11:25 GMT
Reason for closing: Fixed
Additional comments about closing: Should have been fixed by 2013.06
Tuesday, 30 July 2013, 11:25 GMT
Reason for closing: Fixed
Additional comments about closing: Should have been fixed by 2013.06
[#1]systemd-devel@lists.freedesktop.org/msg08426.html"> http://www.mail-archive.com/systemd-devel@lists.freedesktop.org/msg08426.html
In the long-term we might want to switch to a proper network daemon (such as NetworkManager) which will wait for udev to finish processing network devices before using them. However, as was pointed out on the ML, that would bring with it a considerable amount of dependencies, so it is not ideal...
We certainly don't want systemd-udev-settle.service. There's a race condition between udev and other netlink listeners, and it must be solved in either udev or the kernel.
See e.g. https://bugs.freedesktop.org/show_bug.cgi?id=59964#c1.
just use
ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
to disable automatic names.
As far as I can see, this service file could solve this issue by using a udev rule to start an instance for all renamed interfaces:
SUBSYSTEM=="net", NAME!="", ENV{SYSTEMD_WANTS}="dhcpcd-no-wait@$name.service"
This would provide the same functionality as the dhcpcd.service without the race condition. I tested this once on my local machine and it seemed to work as expected. Comments welcome...