Bug 440568
Summary: | anaconda omits 'KERNEL==' criterion from udev persistent-net rules. | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Kazunori Asayama <asayama> | ||||||||||||||||||||||
Component: | udev | Assignee: | Harald Hoyer <harald> | ||||||||||||||||||||||
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||||||||||||||
Severity: | low | Docs Contact: | |||||||||||||||||||||||
Priority: | low | ||||||||||||||||||||||||
Version: | 9 | CC: | dwmw2, harald, notting | ||||||||||||||||||||||
Target Milestone: | --- | Keywords: | Reopened | ||||||||||||||||||||||
Target Release: | --- | ||||||||||||||||||||||||
Hardware: | All | ||||||||||||||||||||||||
OS: | Linux | ||||||||||||||||||||||||
Whiteboard: | |||||||||||||||||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||||||||||||||||
Doc Text: | Story Points: | --- | |||||||||||||||||||||||
Clone Of: | Environment: | ||||||||||||||||||||||||
Last Closed: | 2009-07-15 08:15:33 UTC | Type: | --- | ||||||||||||||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||||||||||||||
Documentation: | --- | CRM: | |||||||||||||||||||||||
Verified Versions: | Category: | --- | |||||||||||||||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||||||||||||
Embargoed: | |||||||||||||||||||||||||
Attachments: |
|
Description
Kazunori Asayama
2008-04-04 03:27:21 UTC
This problem has been fixed in udev-119 by modifying the write_net_rules script. built udev-120 for rawhide how did you modify the write_net_rules script? The write_net_rules script in udev-119 no longer has this problem. This problem is specific to the udev-118 or earlier. So if the upcoming udev for rawhide is udev-120, this problem will disappear. I'll try the latest one. Thank you! The udev-120 still doesn't work correctly. The fix in udev-119/120 seems to be insufficient for Fedora, since the Fedora's /etc/udev/rules.d/60-net.rules defines the 'INTERFACE_NAME' environment variable. Attached is a patch to fix it. I'm not sure that this fix is the most ideal solution, but it works for PS3. Created attachment 301462 [details]
patch for write_net_rules
Created attachment 301485 [details]
patch for write_net_rules (take 2)
So, if I understand that correctly the only difference between eth0 and wlan0 seems to be the KERNEL attribute? /sys/class/net/eth0 and /sys/class/net/wlan0 look both the same? How is that functional in general? It seems like it would lead to many issues other than just udev. Are they magically bridged? We have a similar issue with mesh vs. eth devices on OLPC, where we need to distinguish between them by other attributes in /sys/class/$DEV/ cf. http://dev.laptop.org/ticket/5746 (In reply to comment #7) > So, if I understand that correctly the only difference between eth0 and wlan0 > seems to be the KERNEL attribute? > /sys/class/net/eth0 and /sys/class/net/wlan0 look both the same? The existence of the 'wireless' node is also difference between eth0 and wlan0, so I suppose we can distinguish between them by testing the 'wireless' node. This problem was pointed out in the openSuSE project before: https://bugzilla.novell.com/show_bug.cgi?id=365501 (In reply to comment #8) > How is that functional in general? It seems like it would lead to many issues > other than just udev. > > Are they magically bridged? PS3 assumes these two interfaces (eth and wlan) are connected to separate subnets. We can't use both in the same network at the same time. Created attachment 301740 [details]
/sys/class/net/eth0/
Created attachment 301741 [details]
/sys/class/net/wlan0/
Here is difference between /sys/class/net/eth0 and /sys/class/net/wlan0:
[root@localhost ~]# diff tree-eth0.txt tree-wlan0.txt
44a45,55
> ./wireless
> ./wireless/beacon
> ./wireless/crypt
> ./wireless/fragment
> ./wireless/level
> ./wireless/link
> ./wireless/misc
> ./wireless/noise
> ./wireless/nwid
> ./wireless/retries
> ./wireless/status
$ for i in /sys/class/net/eth0/*; do test -f $i && diff -u /sys/class/net/{eth0,wlan0}/$(basename $i);done will show the difference of the file contents.. e.g. one could check: $ cat /sys/class/net/eth0/carrier 1 which wlan0 does not have. But that is really special for this case now. Created attachment 301786 [details]
diff -Nur /sys/class/net/eth0 /sys/class/net/wlan0/
It's difference of the file contents.
Created attachment 302303 [details]
patch for write_net_rules (take 3)
This patch tests the existence of the 'wireless' directory in the sysfs to
distinguish between PS3's two network interfaces. I think this is the only
meaningful difference between eth and wlan in the sysfs. Is this fix
acceptable?
Created attachment 302312 [details]
Add KERNEL=="$basename*" to all rules, not just some.
Perhaps it would be better to use the basename that the kernel provides (eth%d
vs wlan%d) to distinguish between the interfaces. The write_net_rules script
already does this, in some cases -- I don't see why it shouldn't do it all the
time.
That would fix the Libertas eth%d vs. msh%d case too, without special-case
hacks.
Can we discuss this on the upstream mailing list please? linux-hotplug.org http://vger.kernel.org/vger-lists.html#linux-hotplug Oops, sorry -- I didn't realise that a previous patch had done exactly the same thing, and I was joining an argument :) I posted an alternative solution: http://article.gmane.org/gmane.linux.network/90941 I'm a little confused. If $INTERFACE_NAME is set when the rule is generated (which happens when /etc/sysconfig/network-scripts/ifcfg-eth0 etc. already exist), then write_net_rules will add '(custom name provided by external tool)' to the comment in 70-persistent-net.rules. But after a clean installation, I don't see that text in the rule. And neither do I see the KERNEL== criterion. Is something _else_ writing out these rules for the first time, in the installer? Yes. See the end of anaconda's network.py. Reassigning this to anaconda, which should include the KERNEL== criterion in the rule it creates. And which should probably also admit to having written those rules, rather than blaming it on /lib/udev/write_rules. Created attachment 302432 [details]
patch
This (untested) patch should make anaconda emit rules which match the ones that
the write_net_rules script would write. And also makes anaconda admit liability
for the rules it writes.
Note that write_net_rules is about to change again, to include an ATTR{dev_id} criterion. If we could somehow manage to _use_ the write_net_rules script rather than constantly trying to catch up with what it does, that would be useful. Created attachment 302441 [details]
anaconda patch
This time without the syntax errors...
Created attachment 302478 [details]
take me out back and shoot me
And this time without the bit which writes the rules to stdout instead of to
the rules file. Doh.
Given that the variables used likely change over time too, I'm not sure that just running the script helps things. Committed and pushed this bit My patch from comment #19 has been applied to udev upstream. Please could we have it too? It addresses OLPC trac #5746: http://dev.laptop.org/ticket/5746 Changing version to '9' as part of upcoming Fedora 9 GA. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping This message is a reminder that Fedora 9 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 9. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '9'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 9's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 9 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed. |