[Spacewalk-list] rhnreg_ks on F15

Sandro "red" Mathys red at fedoraproject.org
Wed Apr 13 12:52:33 UTC 2011


2011/4/13 Miroslav Suchý <msuchy at redhat.com>:
> On 04/13/2011 08:24 AM, Sandro "red" Mathys wrote:
>> Hi,
>>
>> We tried to deploy a F15 system (with the latest from updates-testing)
>> from spacewalk 1.3 which works just fine (yay!) except for rhnreg_ks
>> (rhn-setup 1.4.15-1.fc14) which fails with the following traceback:
>>
>> [Tue Apr 12 16:15:15 2011] up2date
>> Traceback (most recent call last):
>>   File "/usr/sbin/rhnreg_ks", line 213, in <module>
>>     cli.run()
>>   File "/usr/share/rhn/up2date_client/rhncli.py", line 74, in run
>>     sys.exit(self.main() or 0)
>>   File "/usr/sbin/rhnreg_ks", line 101, in main
>>     hardwareList = hardware.Hardware()
>>   File "/usr/share/rhn/up2date_client/hardware.py", line 674, in Hardware
>>     allhw = get_devices()
>>   File "/usr/share/rhn/up2date_client/hardware_gudev.py", line 45, in
>> get_devices
>>     'desc':     _get_device_desc(device),
>>   File "/usr/share/rhn/up2date_client/hardware_gudev.py", line 306, in
>> _get_device_desc
>>     (vendor_id, model_id) = device.get_property('product').split('/')[:2]
>> <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'split'
>>
>> It seems that device.get_propery('product') returns None but does
>> somebody have an idea why it does so? On what information does this
>> rely? i.e. is there a service not running that should be or a package
>> missing?
>>
>> Is the extracted information actually important? If not, the thrown
>> exception should rather be caught.
>
>
> It happens during gathering HW info. So if you run it with --nohardware,
> you can workaround it.

--nohardware doesn't resolve the issue, i.e. no change at all.

> It is some USB device. Can you run this python script in both %post
> section of kickstart and after normal reboot? Check the diferences.
> You should look for records with
> XXX: None

Lots of XXX: None found, actually it's always None!
>
> import gudev
> import glib
>
> print "GUDEV VERSION: %s" % gudev.__version__
>
> def print_device(device):
>    print "subsystem", device.get_subsystem()
>    print "devtype", device.get_devtype()
>    print "name", device.get_name()
>    print "number", device.get_number()
>    print "sysfs_path:", device.get_sysfs_path()
>    print "XXX: ", device.get_property('product')
>
> devices = client.query_by_subsystem("usb")

The variable client is not defined at this point, so I added:
client = gudev.Client([""])

> for device in devices:
>    print_device(device)
>
>
> But yeah, having test before that split is probably good idea. I will
> put it in master, but this is not worth of backporting to 1.4.

I would disagree here, IMHO.

Here's the full output of your debug script:

GUDEV VERSION: 147.1
subsystem usb
devtype usb_device
name usb1
number 1
sysfs_path: /sys/devices/pci0000:00/0000:00:1a.0/usb1
XXX:  None
subsystem usb
devtype usb_interface
name 1-0:1.0
number 0
sysfs_path: /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-0:1.0
XXX:  None
subsystem usb
devtype usb_device
name 1-1
number 1
sysfs_path: /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1
XXX:  None
subsystem usb
devtype usb_interface
name 1-1:1.0
number 0
sysfs_path: /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1:1.0
XXX:  None
subsystem usb
devtype usb_device
name usb2
number 2
sysfs_path: /sys/devices/pci0000:00/0000:00:1d.0/usb2
XXX:  None
subsystem usb
devtype usb_interface
name 2-0:1.0
number 0
sysfs_path: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-0:1.0
XXX:  None
subsystem usb
devtype usb_device
name 2-1
number 1
sysfs_path: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1
XXX:  None
subsystem usb
devtype usb_device
name 2-1.1
number 1
sysfs_path: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1
XXX:  None
subsystem usb
devtype usb_device
name 2-1.1.1
number 1
sysfs_path: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.1
XXX:  None
subsystem usb
devtype usb_interface
name 2-1.1.1:1.0
number 0
sysfs_path: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.1/2-1.1.1:1.0
XXX:  None
subsystem usb
devtype usb_interface
name 2-1.1.1:1.1
number 1
sysfs_path: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.1/2-1.1.1:1.1
XXX:  None
subsystem usb
devtype usb_device
name 2-1.1.4
number 4
sysfs_path: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.4
XXX:  None
subsystem usb
devtype usb_interface
name 2-1.1.4:1.0
number 0
sysfs_path: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.4/2-1.1.4:1.0
XXX:  None
subsystem usb
devtype usb_interface
name 2-1.1.4:1.1
number 1
sysfs_path: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.4/2-1.1.4:1.1
XXX:  None
subsystem usb
devtype None
name hiddev0
number 0
sysfs_path: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.4/2-1.1.4:1.1/usb/hiddev0
XXX:  None
subsystem usb
devtype usb_interface
name 2-1.1:1.0
number 0
sysfs_path: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0
XXX:  None
subsystem usb
devtype usb_interface
name 2-1:1.0
number 0
sysfs_path: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1:1.0
XXX:  None




More information about the Spacewalk-list mailing list