linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Race condition for udev/persistent-net
@ 2007-01-18 10:31 Matthias Schwarzott
  2007-01-18 12:08 ` Bryan Kadzban
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Matthias Schwarzott @ 2007-01-18 10:31 UTC (permalink / raw)
  To: linux-hotplug

Hi there!

I am trying to find out why the persistent-net-rules only work sometimes for 
me (using udev-103-r3 on gentoo).

Steps to reproduce: (All files I use are relative to /etc/udev/rules.d)

1. Make sure 70-persistent-net.rules exists.
If not try reloading network modules
and running udevtrigger.

2. Modify NAME-Part of rules to something not used as default (either 
non "eth", or higher numbers like eth7 ...)

3. udevcontol reload_rules


After these steps one can try wheather the existing rules now get applied 
every time or not by:

4. rmmod and modprobe network module.

5. Verify name by "ifconfig -a|grep Ethernet"

6. If name is wrong executing udevtrigger and recheck.

For me the name was correct in 3 out of 15 tries.


The generated rules look like this for me (after changing NAME):
# PCI device 0x8086:0x1076 (e1000)
SUBSYSTEM="net", DRIVERS="?*", ATTRS{address}="xx:xx:xx:xx:xx:xx", 
NAME="eth8"

It seems that DRIVERS is not always set when trying this rule. Removing it, or 
adding next rule to 05-udev-early.rules helped:
ACTION="add", SUBSYSTEM="net", WAIT_FOR_SYSFS="device/driver"


But the problem with this rule is: udev now waits also for a driver entry for 
loopback/bridge devices. This gives ugly log/console output.

Is there a better place to put such a wait-rule?



It is also possible to just skip the DRIVERS="?*" part from the generated 
rules and only keep it in the generator (with the wait inside the generating 
part) to set a reasonable comment.


Greetings
Matthias Schwarzott

-- 
Matthias Schwarzott (zzam)

-------------------------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-01-24 10:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-18 10:31 Race condition for udev/persistent-net Matthias Schwarzott
2007-01-18 12:08 ` Bryan Kadzban
2007-01-24 10:08 ` Matthias Schwarzott
2007-01-24 10:22 ` Kay Sievers

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).