Bug 206884

Summary: /lib/udev/rename_device fails to update DEVPATH when renaming a device
Product: [Fedora] Fedora Reporter: Philippe Troin <phil>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 8.41-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-09-18 17:51:00 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 Flags
Fix none

Description Philippe Troin 2006-09-17 18:22:42 UTC
/lib/udev/rename_device fails to update DEVPATH when renaming a device.

This is a dump of the udev environment before /lib/udev/rename_device is ran:
PHYSDEVPATH=/devices/pci0000:00/0000:00:1e.0/0000:06:03.0/0000:07:00.0
SUBSYSTEM=net
DEVPATH=/class/net/eth0
ACTION=add
PWD=/
UDEV_LOG=3
UDEVD_EVENT=1
SHLVL=1
PHYSDEVDRIVER=prism54
INTERFACE=eth0
PHYSDEVBUS=pci
SEQNUM=1042

This is a dump of the udev environment after rename_device has ran:
PHYSDEVPATH=/devices/pci0000:00/0000:00:1e.0/0000:06:03.0/0000:07:00.0
SUBSYSTEM=net
DEVPATH=/class/net/eth0
ACTION=add
PWD=/
UDEV_LOG=3
UDEVD_EVENT=1
SHLVL=1
PHYSDEVDRIVER=prism54
INTERFACE=wifi-netgear
PHYSDEVBUS=pci
SEQNUM=1042

Notice that INTERFACE got correctly renamed to wifi-netgear, but DEVPATH still
points to /class/net/eth0.

DEVPATH should be updated has well.

This is a problem when:
1. a PCMCIA card is inserted,
2. udev renames the device
3. but since DEVPATH points to a non-existent entry, hal does not register the
new interface (it's not in lshal)
4. since the device is not present in the hal db, NetworkManager does not take
it into account.

This is not a problem for devices present on boot, since hal starts after udev.
 THe problem is glaring for devices appearing after boot.

I've got a patch, I'm testing it right now.

Comment 1 Philippe Troin 2006-09-18 01:11:28 UTC
Created attachment 136500 [details]
Fix

This trivial patch fixes the problem.

Comment 2 Bill Nottingham 2006-09-18 17:51:00 UTC
Added in CVS, will be in 8.41-1 - thanks!