Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#34389 - [netcfg, udev] renaming of multiple interfaces: several race conditions

Attached to Project: Arch Linux
Opened by Alexandre Kandalintsev (exe2) - Wednesday, 20 March 2013, 20:59 GMT
Last edited by Tom Gundersen (tomegun) - Wednesday, 17 April 2013, 19:57 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Jouke Witteveen (jouke)
Dave Reisner (falconindy)
Tom Gundersen (tomegun)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

I'm using arch linux AMD64 with all updates in virtual machine with two interfaces. And here is what I have:
1) netcfg[179]: :: ext up Interface ext does not exist
2) error changing net interface name eth0 to ext: Device or resource busy

Here is some pieces of log (the complete log is attached):


Mar 20 20:44:53 b00 ifplugd[182]: Using interface eth0 with driver <e1000> (version: 7.3.21-k8-NAPI)
Mar 20 20:44:53 b00 ifplugd[182]: Using detection mode: SIOCETHTOOL
Mar 20 20:44:53 b00 ifplugd[182]: Initialization complete, link beat not detected.
...
Mar 20 20:44:53 b00 kernel: e1000 0000:00:03.0 eth0: (PCI:33MHz:32-bit) 52:54:16:12:34:66
Mar 20 20:44:53 b00 kernel: e1000 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection
Mar 20 20:44:53 b00 kernel: input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3
Mar 20 20:44:53 b00 kernel: piix4_smbus 0000:00:01.3: SMBus Host Controller at 0xb100, revision 0
Mar 20 20:44:53 b00 kernel: IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
...
Mar 20 20:44:53 b00 netcfg[179]: :: ext up Interface ext does not exist
Mar 20 20:44:53 b00 netcfg[179]: [fail]
...
Mar 20 20:44:53 b00 kernel: e1000 0000:00:04.0 eth1: (PCI:33MHz:32-bit) 52:54:16:18:b9:e7
Mar 20 20:44:53 b00 kernel: e1000 0000:00:04.0 eth1: Intel(R) PRO/1000 Network Connection
Mar 20 20:44:53 b00 systemd-udevd[116]: error changing net interface name eth0 to ext: Device or resource busy
Mar 20 20:44:53 b00 systemd-udevd[117]: renamed network interface eth1 to int
Mar 20 20:44:54 b00 ifplugd[182]: Link beat detected.
Mar 20 20:44:55 b00 kernel: e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Mar 20 20:44:55 b00 kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Mar 20 20:44:55 b00 ifplugd[182]: Executing '/etc/ifplugd/netcfg.action eth0 up'.
Mar 20 20:44:55 b00 ifplugd[182]: client: up

Additional info:
* package version(s)
systemd 198-1
ifplugd 0.28-13
netcfg 3.0-1
linux 3.8.3-2

* config and/or log files etc.
# cat /etc/udev/rules.d/70-persistent-net.rules:
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="52:54:16:12:34:66", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="ext"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="52:54:16:18:b9:e7", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="int"

Steps to reproduce:
Give a virtual machine two interfaces, assign them new names and try to get this working.
   boot_log (34.3 KiB)
This task depends upon

Closed by  Tom Gundersen (tomegun)
Wednesday, 17 April 2013, 19:57 GMT
Reason for closing:  None
Additional comments about closing:  netcfg is gone, appears to work with netctl
Comment by Tobias Powalowski (tpowa) - Thursday, 21 March 2013, 17:09 GMT
Why don't you just use systemd's persistent names?
/etc/udev/rules.d/*network*
Comment by Dave Reisner (falconindy) - Thursday, 21 March 2013, 17:24 GMT
This looks like a boot log from a qemu VM -- I know that at least for virtio-net devices, there are no attributes exported that udev will use for persistent naming.
Comment by Tobias Powalowski (tpowa) - Thursday, 21 March 2013, 17:47 GMT
Ah true, i saw this on qemu too with virtio enabled that eth0 is still used.
Comment by Alexandre Kandalintsev (exe2) - Thursday, 21 March 2013, 18:10 GMT
> Why don't you just use systemd's persistent names?

Because this is a horrible idea. The interface names should be meaningful. When you have just one interface it doesn't matter how it is called. But if you have more than one interface it's better to assign the names wisely. In other words, I had hard-to-track troubles several times when I confused internal and external NICs in bridge and iptables.
Comment by Alexandre Kandalintsev (exe2) - Saturday, 23 March 2013, 16:46 GMT
By the way, I can provide an access for developers to the virtual machines if there is a need... Contact me by jabber true@jabber.no
Comment by Tom Gundersen (tomegun) - Saturday, 23 March 2013, 17:26 GMT
So netcfg needs to order itself after the interface it wants to use appearing (in this case ext). Jouke: is this something netcfg should be able to do? Would netctl?

An alternative would be to use networkmanager, which does this correctly afaik.
Comment by Jouke Witteveen (jouke) - Sunday, 24 March 2013, 10:05 GMT
netctl (netcfg reworked for systemd) supposedly does this correct already. I expect it to move to [core] or [extra] soon-ish (it currently is in [testing]).
Comment by Alexandre Kandalintsev (exe2) - Monday, 25 March 2013, 10:44 GMT
If netctl is the official future replacement of netcfg then we can close the ticket...
Comment by Alexandre Kandalintsev (exe2) - Wednesday, 27 March 2013, 13:01 GMT
I tried netctl, it doesn't work for me.

Tried to add to autostart (this seems is not documented):
~~~
# systemctl enable netctl@ext
The unit files have no [Install] section.
~~~

I added "WantedBy=multi-user.target" in [Install] to /usr/lib/systemd/system/netctl@.service. Unfortunately I've got the same problem:

Mar 27 12:58:01 b00 network[177]: Starting network profile 'ext'...
Mar 27 12:58:01 b00 network[177]: Interface 'ext' does not exist
Mar 27 12:58:01 b00 network[177]: Failed to bring the network up for profil...t'
[root@b00 ~]#

Seems the same problem
Comment by Jouke Witteveen (jouke) - Wednesday, 27 March 2013, 13:03 GMT
RTFM: `netctl enable ext` if you have a profile named "ext". Note: the profile name and the interface name are different things (although they can be the same).

If you need to mess with the code, you're probably doing something wrong.
Comment by Alexandre Kandalintsev (exe2) - Thursday, 28 March 2013, 15:14 GMT
Thanks, now everything is fine.

Loading...