From: Andrey Borzenkov <arvidjaar@mail.ru>
To: linux-hotplug@vger.kernel.org
Subject: Re: Udev sometimes forgets to RUN a program when renaming network
Date: Fri, 05 Jan 2007 12:50:35 +0000 [thread overview]
Message-ID: <200701051550.41046.arvidjaar@mail.ru> (raw)
In-Reply-To: <459E44C8.1080204@ums.usu.ru>
-----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-----
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
prev parent reply other threads:[~2007-01-05 12:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-05 12:30 Udev sometimes forgets to RUN a program when renaming network Alexander E. Patrakov
2007-01-05 12:50 ` Andrey Borzenkov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200701051550.41046.arvidjaar@mail.ru \
--to=arvidjaar@mail.ru \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).