Bug 907365
Summary: | initscripts tries to rename added type 803 monitor mode interface | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Edward Sheldrake <ejsheldrake> | ||||
Component: | initscripts | Assignee: | Lukáš Nykrýn <lnykryn> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 18 | CC: | iarlyy, johannbg, jonathan, lnykryn, metherid, msalem, mschmidt, msekleta, notting, plautrba, systemd-maint, vpavlin | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | initscripts-9.42.2-1.fc18 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2013-02-26 02:44:52 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 881006 | ||||||
Attachments: |
|
Description
Edward Sheldrake
2013-02-04 08:25:00 UTC
Please attach: - the file /etc/udev/rules.d/70-persistent-net.rules - the output of: udevadm test /sys/class/net/rename8 This might be caused by creating a device with the same MAC address. The logic never really covered these cases. /etc/udev/rules.d/70-persistent-net.rules is a left-over from an earlier distribution, we do not create any files in /etc any more. Unfortunately, it requires manual attention, and we cannot do the cleanup/ conversion by RPM. It's not simple to find out, if people edited or added things to that file. After removing all entries in /etc/udev/rules.d/70-persistent-net.rules, or by just deleting the file and rebooting, the device name should not be touched any more, right? Created attachment 692704 [details]
udevadm test output
I removed 70-persistent-net.rules (and 70-persistent-cd.rules) and rebooted. I now have Auto_eth0 instead of eth0, lo, wlan0, and rename4 instead of moni0. From the udevadm test output: PROGRAM '/lib/udev/rename_device' /usr/lib/udev/rules.d/60-net.rules:1 starting '/lib/udev/rename_device' '/lib/udev/rename_device' [4321] exit with return code 0 NAME 'wlan0' /usr/lib/udev/rules.d/60-net.rules:1 So the name comes from the renaming performed by initscripts (based on /etc/sysconfig/network-scripts/ifcfg-* contents). Since initscripts' rename_device naively chooses the name to apply based on the MAC address only, I don't see how that could have possibly been doing anything sane in the presence of wlan monitor interfaces. Did this setup work for you in Fedora 17? (In reply to comment #4) > I removed 70-persistent-net.rules (and 70-persistent-cd.rules) and rebooted. > I now have Auto_eth0 instead of eth0, lo, wlan0, and rename4 instead of > moni0. If these are really your network interface names, "Auto_eth0" sounds like some NetworkManager weirdness stored in /etc/sysconfig/network-scripts/ifcfg-*. It is no name the base system would choose. Can you try removing files from: /etc/sysconfig/network-scripts/ifcfg-* ? My setup was working fine until this morning, which was the first time I booted since installing systemd-197-1.fc18.2. Yes, part of the trouble comes from the /etc/sysconfig/network-scripts/ifcfg-* files. I deleted /etc/sysconfig/network-scripts/ifcfg-Auto_eth0 and unloaded and reloaded the r8169 module to get it back to eth0. I have removed the HWADDR line with the MAC address from /etc/sysconfig/networking/devices/ifcfg-wlan0 and now systemd no longer attempts to rename moni0. Previous Fedora 18 versions quietly logged: Jan 21 11:41:44 obsidian systemd-udevd[273]: error changing net interface name moni0 to wlan0: File exists but didn't then proceed to rename moni0 to something else. Systemd just follows the instructions from initscripts, which should not try to rename the monitor devices, which are device type 803 instead of 1. Reassigning to initscripts. (In reply to comment #8) > Previous Fedora 18 versions quietly logged: > Jan 21 11:41:44 obsidian systemd-udevd[273]: error changing net interface > name moni0 to wlan0: File exists Yes. And people hated it. See bug 896135. That's why I was specifically interested in how Fedora 17 behaved. Because the change in systemd-197-1.fc18.2 is trying to restore udev's ability to rename net interfaces like it did in F17. Unfortunately my udev skills are quite poor, do you think that patch like this will fixed the issue? diff --git a/udev/rules.d/60-net.rules b/udev/rules.d/60-net.rules index 1e9d940..876ff9b 100644 --- a/udev/rules.d/60-net.rules +++ b/udev/rules.d/60-net.rules @@ -1 +1,3 @@ +KERNEL=="wlan*", ATTRS{type}=="803", GOTO="net_rules_end" ACTION=="add", SUBSYSTEM=="net", PROGRAM="/lib/udev/rename_device", RESULT=="?*", NAME="$result" +LABEL="net_rules_end" I suspect initscripts should not rename anything besides type == "1" devices. Many of the other device types get a device name passed by the tools that create them, and renaming is not too useful then. Limiting initscripts to the absolute minimum that is expected, seems like the best approach, blacklisting explicit types doesn't sound like the right thing considering the "creativity" in the network device type area. :) So something like following? ACTION=="add", SUBSYSTEM=="net", ATTRS{type}=="1", PROGRAM="/lib/udev/rename_device", RESULT=="?*", NAME="$result" I'm getting good results with the following rule in 60-net.rules: ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="1", PROGRAM="/lib/udev/rename_device", RESULT=="?*", NAME="$result" The DRIVERS check is important, as it excludes virtual devices (such as VLANs, ...). I found this by looking at how older Fedora releases (and RHEL6) worked. The check was not present directly in 60-net.rules, but it was included in the generated rules. Note there's ATTR, not ATTRS. We don't need to look at parent attributes. *** Bug 912323 has been marked as a duplicate of this bug. *** Lukáš, I'd like to have the fixed initscripts added to the systemd-197-1.fc18.2 update in Bodhi, to make it a grouped update. initscripts-9.42.2-1.fc18, systemd-197-1.fc18.2 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/FEDORA-2013-1590/initscripts-9.42.2-1.fc18,systemd-197-1.fc18.2 Package initscripts-9.42.2-1.fc18, systemd-197-1.fc18.2: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing initscripts-9.42.2-1.fc18 systemd-197-1.fc18.2' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-1590/initscripts-9.42.2-1.fc18,systemd-197-1.fc18.2 then log in and leave karma (feedback). initscripts-9.42.2-1.fc18, systemd-197-1.fc18.2 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. |