Bug#765577: udev-udeb: Write dupliate entries into 70-persistent-net.rules

Michael Biebl biebl at debian.org
Thu Oct 16 16:12:59 BST 2014


Am 16.10.2014 um 13:09 schrieb Petter Reinholdtsen:
> 
> Package: udev-udeb
> Version: 215-5+b1
> Severity: important
> User: debian-edu at lists.debian.org
> Usertags: debian-edu
> 
> I ran into this problem when installing a Debian Edu Jessie workstation
> using PXE on a Lenovo Thinkpad X200.  The problem at the end is that
> users can not log into the workstation because the network interface is
> not properly configured.  This is caused by the network card to show up
> as eth1 instead of eth0.  Only eth0 is configured in
> /etc/network/interfaces.
> 
> This in turn is caused by /etc/udev/rules.d/70-presisten-net.rules
> listing the network card twice, once with eth0 and once with eth1.  The
> file look like this:
> 
>   # This file was automatically generated by the /lib/udev/write_net_rules
>   # program, run by the persistent-net-generator.rules rules file.
>   #
>   # You can modify it, as long as you keep each rule on a single
>   # line, and change only the value of the NAME= key.
> 
>   # PCI device 0x8086:0x10f5 (e1000e)
>   SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1f:16:0b:47:4d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
> 
>   # PCI device 0x8086:0x10f5 (e1000e)
>   SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1f:16:0b:47:4d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
> 
> As this have not happend to me every time, I have tried to figure out
> what is special about this setup, but do not know the udev stuff enough
> to have a clue.  I do notice this part in the log, which seem to be
> related:
> 
> Oct 16 10:51:35 main-menu[186]: INFO: Menu item 'ethdetect' selected
> Oct 16 10:51:35 kernel: [    2.532038] usb 2-2: new full-speed USB device number 3 using uhci_hcd
> Oct 16 10:51:35 net/hw-detect.hotplug: Detected hotpluggable network interface lo
> Oct 16 10:51:35 net/hw-detect.hotplug: Detected hotpluggable network interface eth1
> Oct 16 10:51:35 kernel: [    2.620227] systemd-udevd[51]: renamed network interface eth0 to eth1
> Oct 16 10:51:35 kernel: [    2.636070] Switched to clocksource tsc
> Oct 16 10:51:35 kernel: [    2.707037] usb 2-2: New USB device found, idVendor=0a5c, idProduct=2145
> Oct 16 10:51:35 kernel: [    2.707039] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> Oct 16 10:51:35 kernel: [    2.707042] usb 2-2: Product: ThinkPad Bluetooth with Enhanced Data Rate II
> Oct 16 10:51:35 kernel: [    2.707043] usb 2-2: Manufacturer: Lenovo Computer Corp
> Oct 16 10:51:35 hw-detect: Detected module 'usb-storage' for 'USB storage'
> 
> Notice how eth0 was renamed to eth1 by udev while hw-detect version
> 1.104 was running.  Any clue what is going wrong here?
> 


Could be a race. Maybe hwdetect triggers a uevent for your ethernet
device, while /lib/udev/write_net_rules has not finished yet writing
70-persistent-net.rules and udev having picked up the changed
70-persistent-net.rules (via inotify). So instead of applying the
generated rule for eth0, it generates a new rule, for eth1.

Marco is the expert here though, so maybe he can shed some light on this.

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20141016/78e8e7ad/attachment-0005.sig>


More information about the Pkg-systemd-maintainers mailing list