Bug 618250

Summary: error sending hardware profile when non-xmlrpc-compliant chars are returned by dmidecode
Product: Red Hat Enterprise Linux 5 Reporter: Miroslav Suchý <msuchy>
Component: rhnlibAssignee: Miroslav Suchý <msuchy>
Status: CLOSED ERRATA QA Contact: Pavel Novotny <pnovotny>
Severity: high Docs Contact:
Priority: urgent    
Version: 5.5CC: ahumbe, cperry, fnadge, jhutar, jwest, marcobillpeter, mosvald, mpoole, mzazrivec, pnovotny, psklenar, tao, vgaikwad, xdmoon
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rhnlib-2.5.22-4.el5 rhn-client-tools-0.4.20-44.el5 Doc Type: Bug Fix
Doc Text:
Previously, the registration of RHEL 4 systems failed if dmidecode returned BIOS information that contained non-XMLRPC-compliant characters. This update uses a XMLRPC-compliant set of characters.
Story Points: ---
Clone Of: 579830 Environment:
Last Closed: 2011-01-14 00:11:59 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:
Bug Depends On: 618267    
Bug Blocks: 639226    

Comment 2 Miroslav Suchý 2010-08-19 12:53:28 UTC
cherrypicked from spacewalk.git commits 931c907632ef023d66cec1dbc483851559d935a6, 6f7c1cd5714b536d10d78273645ba6f5779ed3f8, c37e320027949b7e69900dd88f1ff97594fbfafe with minor modification as rev. 195369.

Comment 4 Miroslav Suchý 2010-09-29 12:26:57 UTC
instead of commit 931c907632ef023d66cec1dbc483851559d935a6 in #2 should be 16fddd9063c5a5dabce2b849416c5e0dddf3438e

Comment 9 Pavel Novotny 2010-10-20 13:47:02 UTC
Verified.

This bug is hardware dependent, but the following reproducer works on *EVERY* machine:

The point is to modify device description string to contain some of the special characters, then restart HAL daemon and run kudzu to refresh HW info. And then try register the system to Satellite:
1. run 'lspci' and pick descrition string of one of your device
2. edit file '/usr/share/hwdata/pci.ids', locate the corresponding description string of your device and add some special chars to it
3. run 'service haldaemon restart' && 'kudzu'
4. Done, you can try to register the system to Satellite

-----------------
# PYTHONPATH=/usr/share/rhn python -c "from up2date_client import hardware; from pprint import pprint;  pprint(hardware.Hardware())"
...
...
{ 'bus': u'pci',
  'class': 'OTHER',
  'desc': u'Intel Corporation|80332 [Dobson signs:\xa9\x0c\x0e\xae\x01\x12\x10] I/O processor (A-Segment Bridge) ',
  'detached': 0,
  'driver': 'unknown',
  'pciType': 1 }
...
...
-----------------

The string contains unusual characters like (c) - copyright, (r) - registered, form-feed and others.
Registration with original 'rhnlib' and 'rhn-client-tools' package returns error message (see below), but the system *is registered* in Satellite, but the HW profile is just blank.
-----------------
# rpm -q rhnlib rhn-client-tools
rhnlib-2.5.22-3.el5
rhn-client-tools-0.4.20-33.el5
# rhnreg_ks --serverUrl=... --username=... --password=... --force
An error has occurred:
Internal Server Error
See /var/log/up2date for more information
-----------------

New version of 'rhnlib' and 'rhn-client-tools' works fine:
-----------------
# rpm -q rhnlib rhn-client-tools
rhnlib-2.5.22-4.el5
rhn-client-tools-0.4.20-44.el5
# rhnreg_ks --serverUrl=... --username=... --password=... --force
-----------------
Passed, no errors or stacktrace on server/client side.

Comment 11 Florian Nadge 2011-01-03 09:48:51 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, the registration of RHEL 4 systems failed if dmidecode returned BIOS information that contained non-XMLRPC-compliant characters. This update uses a XMLRPC-compliant set of characters.

Comment 12 errata-xmlrpc 2011-01-14 00:11:59 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0113.html