[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#403706: Udev sometimes forgets to RUN a program when renaming network interface



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 05 January 2007 15:30, Alexander E. Patrakov wrote:
[...]
>
> 5) Now edit /etc/network/interfaces so that it mentions eth0 instead of
> eth1, and edit /etc/udev/rules.d/z25_persistent-net.rules by swapping eth0
> and eth1 (so that 00:0c:29:d8:39:6e becomes eth0 and 00:0c:29:d8:39:64
> becomes eth1). The intention is, as you may have guessed, is to swap the
> names, so that the used card becomes eth0, and the useless one is eth1. The
> consequence is that the renaming rules become essential.
>
> 6) Reboot. This time it prints the message:
>
> udevd-event[2669]: rename_netif: error changing net interface name
> eth1_rename to eth0: No such device
>
> (but "ifconfig -a" shows that the 00:0c:29:d8:39:6e card does become eth0)
>

I confirm this for Mandriva cooker with udev 103 and kernel 2.6.20-rc3. The 
two interfaces are eth0 (PCI e100 normally unused) and eth1 (built-in PCMCIA 
wireless, primary interface). Effectively the latter is found first by 
coldplugging then the former is loaded by network startup script. The 
interface eth1 gets renamed and comes up just fine; I have not tried eth0. 
Both have DHCP.

> Then it prints a message that it found eth1 and lo, and no message about
> eth0. And of course, the network is not up, because udev forgot to run
> net.agent for the new eth0. Bug!
>

Looks like it; I should have 2 dhclient while I have just one for eth1:

{pts/1}% pgrep -l dh
3491 dhclient
{pts/1}% ps wwwfp 3491
  PID TTY      STAT   TIME COMMAND
 3491 ?        Ss     0:00 
dhclient -1 -q -lf /var/lib/dhcp/dhclient-eth1.leases -pf /var/run/dhclient-eth1.pid -cf /etc/dhclient-eth1.conf 
eth1

As far as I can tell, the bug happens under 2.6.20; I have not seen it under 
2.6.19 or earlier.

I did not get around to debugging this yet.

- -andrey

> While it took us some special preparations to trigger this bug with two
> identical network cards, I guess that this will happen by itself with 50%
> probability if the network cards are not identical, due to random module
> loading order.
>
> 7) This time, repeat step (5), using names "used" and "unused" for the two
> interfaces, reboot and watch how udev finds the "used", "unused" and "lo"
> interfaces.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFnkmgR6LMutpd94wRAmzlAJkBZLkAygg7UENvqYiWsvkGRyim2ACgh4MO
w8+ZnjwTFo4o9k34pATybmo=
=THa9
-----END PGP SIGNATURE-----



Reply to: