Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
After upgrading from hwdata-0.252-8.2.el7.x86_64 to hwdata-0.252-8.3.el7.x86_64 from the latest-RHEL-7 nightly compose, automated testing with rhnreg_ks fails to register to a satellite 5 server with the following Traceback...
[Wed Sep 28 14:45:18 2016] up2date
Traceback (most recent call last):
File "/usr/sbin/rhnreg_ks", line 218, in <module>
cli.run()
File "/usr/share/rhn/up2date_client/rhncli.py", line 96, 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 788, 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 295, in _get_device_desc
usb = USB()
File "/usr/lib/python2.7/site-packages/hwdata.py", line 51, in __init__
USB.devices[vendor][1][device][0][interface_id] = interface_name
<type 'exceptions.TypeError'>: 'str' object does not support item assignment
The offending file /usr/lib/python2.7/site-packages/hwdata.py is provided by package python-hwdata-1.7.3-4.el7.noarch
Opening the hwdata.py and putting in some print statements before line 51 to help troubleshoot, I found...
print interface_name
=returns=======> 0003 M26 - BT Smart Watch for Android Phones
print interface_id
=returns=======> 0e8d
print USB.devices[vendor][1][device][0]
=returns=======> MT6227 phone
I'm not a python programmer, but it looks like USB.devices[vendor][1][device][0] is returning a string object rather than a data structure with an element index 0e8d. Hence the traceback "'str' object does not support item assignment" is thrown.
My hardware is an x86_64 KVM guest running RHEL73 Snapshot 5 compose.
I suspect that a change from Bug 1292382 caused this regression.
[root@jsefler-rhel7 ~]# rpm -q --changelog hwdata | head
* Mon Sep 26 2016 Vitezslav Crhonek <vcrhonek> - 0.252-8.3
- Updated pci, usb and vendor ids.
- Resolves: rhbz#1292382
* Tue Jun 28 2016 Michal Minar <miminar> 0.252-8.2
- Updated pci, usb and vendor ids.
- Resolves: rhbz#1292382
- Resolves: rhbz#1291614
- Resolves: rhbz#1324198
Version-Release number of selected component (if applicable):
[root@jsefler-rhel7 ~]# rpm -q hwdata python-hwdata rhn-client-tools
hwdata-0.252-8.3.el7.x86_64
python-hwdata-1.7.3-4.el7.noarch
rhn-client-tools-2.0.2-8.el7.noarch
How reproducible:
always with hwdata-0.252-8.3.el7.x86_64
never with hwdata-0.252-8.2.el7.x86_64
Steps to Reproduce:
ON A KVM GUEST RUNNING RHEL73 Snapshot 5...
[root@jsefler-rhel7 ~]# rhnreg_ks --serverUrl=https://rhsm-sat5.usersys.redhat.com/XMLRPC --username=rhsm-client --password=REDACTED --profilename=rhsm-automation.jsefler-rhel7.usersys.redhat.com --force --norhnsd --nopackages --novirtinfo --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT_rhsm-sat5.usersys.redhat.com
An error has occurred:
<type 'exceptions.TypeError'>
See /var/log/up2date for more information
[root@jsefler-rhel7 ~]# tail /var/log/up2date
File "/usr/share/rhn/up2date_client/hardware.py", line 788, 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 295, in _get_device_desc
usb = USB()
File "/usr/lib/python2.7/site-packages/hwdata.py", line 51, in __init__
USB.devices[vendor][1][device][0][interface_id] = interface_name
<type 'exceptions.TypeError'>: 'str' object does not support item assignment
[root@jsefler-rhel7 ~]# rpm -q --whatprovides /usr/lib/python2.7/site-packages/hwdata.py
python-hwdata-1.7.3-4.el7.noarch
[root@jsefler-rhel7 ~]# rpm -q python-hwdata --requires
hwdata
python(abi) = 2.7
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
[root@jsefler-rhel7 ~]# rpm -q --whatrequires python-hwdata
rhn-client-tools-2.0.2-8.el7.noarch
[root@jsefler-rhel7 ~]#
Additional info:
AFTER DOWNGRADING PACKAGE hwdata BACK TO RHEL73 Snapshot 5, LIFE IS GOOD AGAIN...
[root@jsefler-rhel7 ~]# yum downgrade hwdata --enablerepo=snapshot5-rhel73-server --quiet -y
[root@jsefler-rhel7 ~]# rpm -q hwdata
hwdata-0.252-8.2.el7.x86_64
[root@jsefler-rhel7 ~]# rhnreg_ks --serverUrl=https://rhsm-sat5.usersys.redhat.com/XMLRPC --username=rhsm-client --password=REDACTED --profilename=rhsm-automation.jsefler-rhel7.usersys.redhat.com --force --norhnsd --nopackages --novirtinfo --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT_rhsm-sat5.usersys.redhat.com
[root@jsefler-rhel7 ~]#
[root@jsefler-rhel7 ~]# rhn-channel --list
rhel-x86_64-server-7
[root@jsefler-rhel7 ~]#
I can successfully register to a Sat5 server with hwdata-0.252-8.2.el7 but not with hwdata-0.252-8.3.el7
Comment 1Vitezslav Crhonek
2016-09-29 07:09:07 UTC
Hello John,
Thanks for investigation. It is caused by bad indentation of that item in usb.ids:
...
0e8d MediaTek Inc.
0003 MT6227 phone
0e8d 0003 M26 - BT Smart Watch for Android Phones
0004 MT6227 phone
...
Fixing the indentation of that line fixes the issue (although the whole item seems suspicious to me).
Just FI, this particular item [1] was changed on 2016-09-07 and yesterday's release of the upstream list ([2]) still contains this error.
[1] https://usb-ids.gowdy.us/read/UD/0e8d/0003/0e8d0003
[2] http://www.linux-usb.org/usb.ids
Comment 2Vitezslav Crhonek
2016-09-29 08:47:26 UTC
ALL TESTS PASSED
Using the example.py script form python-hwdata pkg, verified the 'TypeError: 'str' object does not support item assignment' error is no longer generated after update
Before
================
[root@localhost hwdata]# rpm -q hwdata
hwdata-0.252-8.3.el7.x86_64
[root@localhost hwdata]# python example.py
Vendor: Compaq Computer Corporation
Device: NC3120 Fast Ethernet NIC
Traceback (most recent call last):
File "example.py", line 19, in <module>
usb = USB()
File "/usr/lib/python2.7/site-packages/hwdata.py", line 51, in __init__
USB.devices[vendor][1][device][0][interface_id] = interface_name
TypeError: 'str' object does not support item assignment
After
================
[root@localhost hwdata]# yum update hwdata-0.252-8.4.el7.x86_64.rpm
[root@localhost hwdata]# rpm -q hwdata
hwdata-0.252-8.4.el7.x86_64
[root@localhost hwdata]# python example.py
Vendor: Compaq Computer Corporation
Device: NC3120 Fast Ethernet NIC
Vendor: Hewlett-Packard
Device: OfficeJet Pro K5300
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2016-2494.html
Description of problem: After upgrading from hwdata-0.252-8.2.el7.x86_64 to hwdata-0.252-8.3.el7.x86_64 from the latest-RHEL-7 nightly compose, automated testing with rhnreg_ks fails to register to a satellite 5 server with the following Traceback... [Wed Sep 28 14:45:18 2016] up2date Traceback (most recent call last): File "/usr/sbin/rhnreg_ks", line 218, in <module> cli.run() File "/usr/share/rhn/up2date_client/rhncli.py", line 96, 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 788, 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 295, in _get_device_desc usb = USB() File "/usr/lib/python2.7/site-packages/hwdata.py", line 51, in __init__ USB.devices[vendor][1][device][0][interface_id] = interface_name <type 'exceptions.TypeError'>: 'str' object does not support item assignment The offending file /usr/lib/python2.7/site-packages/hwdata.py is provided by package python-hwdata-1.7.3-4.el7.noarch Opening the hwdata.py and putting in some print statements before line 51 to help troubleshoot, I found... print interface_name =returns=======> 0003 M26 - BT Smart Watch for Android Phones print interface_id =returns=======> 0e8d print USB.devices[vendor][1][device][0] =returns=======> MT6227 phone I'm not a python programmer, but it looks like USB.devices[vendor][1][device][0] is returning a string object rather than a data structure with an element index 0e8d. Hence the traceback "'str' object does not support item assignment" is thrown. My hardware is an x86_64 KVM guest running RHEL73 Snapshot 5 compose. I suspect that a change from Bug 1292382 caused this regression. [root@jsefler-rhel7 ~]# rpm -q --changelog hwdata | head * Mon Sep 26 2016 Vitezslav Crhonek <vcrhonek> - 0.252-8.3 - Updated pci, usb and vendor ids. - Resolves: rhbz#1292382 * Tue Jun 28 2016 Michal Minar <miminar> 0.252-8.2 - Updated pci, usb and vendor ids. - Resolves: rhbz#1292382 - Resolves: rhbz#1291614 - Resolves: rhbz#1324198 Version-Release number of selected component (if applicable): [root@jsefler-rhel7 ~]# rpm -q hwdata python-hwdata rhn-client-tools hwdata-0.252-8.3.el7.x86_64 python-hwdata-1.7.3-4.el7.noarch rhn-client-tools-2.0.2-8.el7.noarch How reproducible: always with hwdata-0.252-8.3.el7.x86_64 never with hwdata-0.252-8.2.el7.x86_64 Steps to Reproduce: ON A KVM GUEST RUNNING RHEL73 Snapshot 5... [root@jsefler-rhel7 ~]# rhnreg_ks --serverUrl=https://rhsm-sat5.usersys.redhat.com/XMLRPC --username=rhsm-client --password=REDACTED --profilename=rhsm-automation.jsefler-rhel7.usersys.redhat.com --force --norhnsd --nopackages --novirtinfo --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT_rhsm-sat5.usersys.redhat.com An error has occurred: <type 'exceptions.TypeError'> See /var/log/up2date for more information [root@jsefler-rhel7 ~]# tail /var/log/up2date File "/usr/share/rhn/up2date_client/hardware.py", line 788, 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 295, in _get_device_desc usb = USB() File "/usr/lib/python2.7/site-packages/hwdata.py", line 51, in __init__ USB.devices[vendor][1][device][0][interface_id] = interface_name <type 'exceptions.TypeError'>: 'str' object does not support item assignment [root@jsefler-rhel7 ~]# rpm -q --whatprovides /usr/lib/python2.7/site-packages/hwdata.py python-hwdata-1.7.3-4.el7.noarch [root@jsefler-rhel7 ~]# rpm -q python-hwdata --requires hwdata python(abi) = 2.7 rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(PayloadIsXz) <= 5.2-1 [root@jsefler-rhel7 ~]# rpm -q --whatrequires python-hwdata rhn-client-tools-2.0.2-8.el7.noarch [root@jsefler-rhel7 ~]# Additional info: AFTER DOWNGRADING PACKAGE hwdata BACK TO RHEL73 Snapshot 5, LIFE IS GOOD AGAIN... [root@jsefler-rhel7 ~]# yum downgrade hwdata --enablerepo=snapshot5-rhel73-server --quiet -y [root@jsefler-rhel7 ~]# rpm -q hwdata hwdata-0.252-8.2.el7.x86_64 [root@jsefler-rhel7 ~]# rhnreg_ks --serverUrl=https://rhsm-sat5.usersys.redhat.com/XMLRPC --username=rhsm-client --password=REDACTED --profilename=rhsm-automation.jsefler-rhel7.usersys.redhat.com --force --norhnsd --nopackages --novirtinfo --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT_rhsm-sat5.usersys.redhat.com [root@jsefler-rhel7 ~]# [root@jsefler-rhel7 ~]# rhn-channel --list rhel-x86_64-server-7 [root@jsefler-rhel7 ~]# I can successfully register to a Sat5 server with hwdata-0.252-8.2.el7 but not with hwdata-0.252-8.3.el7