From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrey Borzenkov Date: Fri, 05 Jan 2007 12:50:35 +0000 Subject: Re: Udev sometimes forgets to RUN a program when renaming network Message-Id: <200701051550.41046.arvidjaar@mail.ru> List-Id: References: <459E44C8.1080204@ums.usu.ru> In-Reply-To: <459E44C8.1080204@ums.usu.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org -----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. T= he > 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= =20 two interfaces are eth0 (PCI e100 normally unused) and eth1 (built-in PCMCI= A=20 wireless, primary interface). Effectively the latter is found first by=20 coldplugging then the former is loaded by network startup script. The=20 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=20 dhclient -1 -q -lf /var/lib/dhcp/dhclient-eth1.leases -pf /var/run/dhclient= -eth1.pid -cf /etc/dhclient-eth1.conf=20 eth1 As far as I can tell, the bug happens under 2.6.20; I have not seen it unde= r=20 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=3DTHa9 -----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=3Djoin.php&p=3Dsourceforge&CID=DEVD= EV _______________________________________________ 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