[systemd-bugs] [Bug 56929] New: udev makes network interfaces available before it has renamed them

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Nov 9 09:35:59 PST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=56929

          Priority: medium
            Bug ID: 56929
          Assignee: systemd-bugs at lists.freedesktop.org
           Summary: udev makes network interfaces available before it has
                    renamed them
        QA Contact: systemd-bugs at lists.freedesktop.org
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: dsd at laptop.org
          Hardware: Other
            Status: NEW
           Version: unspecified
         Component: general
           Product: systemd

Created attachment 69830
  --> https://bugs.freedesktop.org/attachment.cgi?id=69830&action=edit
full journald log

Fedora 18 (systemd-195-2.fc18) running on OLPC XO laptops.

We ship a udev rule that renames eth* network interfaces when they are found.

   KERNEL=="eth*", PROGRAM="olpc_eth_namer", NAME="%c"

This rule is no longer working, the renames fail with error:

   systemd-udevd[258]: error changing net interface name eth0 to eth1: Device
or resource busy

The journalctl logs (attached) show that NetworkManager is activating the
device before udev rules have run. Here is the trimmed sequence of events:

First the device appears and NM starts doing stuff with it, including bringing
the interface up:

Nov 09 16:38:37 xo-93-20-8d.localdomain kernel: asix 1-1.2:1.0: eth0: register
'asix' at usb-d4208000.usb-1.2, ASIX AX88772 USB 2.0 Ethernet,
00:1c:49:01:05:e9
Nov 09 16:38:38 xo-93-20-8d.localdomain NetworkManager[371]: <info> (eth0):
carrier is OFF
Nov 09 16:38:38 xo-93-20-8d.localdomain NetworkManager[371]: <error>
[1352479118.338790] [nm-device-ethernet.c:454] update_permanent_hw_address():
(eth0): unable to read permanent MAC address (error 0)
Nov 09 16:38:38 xo-93-20-8d.localdomain NetworkManager[371]: <info> (eth0): new
Ethernet device (driver: 'asix' ifindex: 2)
Nov 09 16:38:39 xo-93-20-8d.localdomain kernel: IPv6: ADDRCONF(NETDEV_UP):
eth0: link is not ready
Nov 09 16:38:39 xo-93-20-8d.localdomain NetworkManager[371]: <info> (eth0):
preparing device.

Then my udev rule PROGRAM gets run which outputs these lines to /dev/kmsg:

Nov 09 16:38:39 xo-93-20-8d.localdomain : eth namer
Nov 09 16:38:39 xo-93-20-8d.localdomain : eth namer eth1

Its trying to rename the new device to eth1. But that then fails, because the
network interface is up.

Nov 09 16:38:40 xo-93-20-8d.localdomain systemd-udevd[258]: error changing net
interface name eth0 to eth1: Device or resource busy


I checked the NM code, it uses libgudev to become aware of new network devices,
and ones that are available at startup. So this seems like a udev bug - it
should not be advertising these devices to libgudev clients before udev itself
has finished applying the rule-driven configuration.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20121109/6b5cf076/attachment.html>


More information about the systemd-bugs mailing list