Escalated to Bugzilla from IssueTracker
Event posted on 2010-04-06 14:23 BST by tpapaioa Description of problem: Registration of RHEL 4 system fails when the BIOS information returned by dmidecode contains characters like "form feed" (0x0c). How reproducible: 100% for about a dozen of this customer's servers (Sun Fire X4150). Steps to Reproduce: Run rhnreg_ks or rhn_register to register system to Satellite server. Actual results: Registration fails with Internal Server Error, and the following in /var/log/up2date on the client system: [Thu Mar 18 19:30:16 2010] up2date A protocol error occurred: Internal Server Error , attempt #1, [Thu Mar 18 19:30:21 2010] up2date A protocol error occurred: Internal Server Error , attempt #2, [Thu Mar 18 19:30:26 2010] up2date A protocol error occurred: Internal Server Error , attempt #3, [Thu Mar 18 19:30:31 2010] up2date A protocol error occurred: Internal Server Error , attempt #4, [Thu Mar 18 19:30:37 2010] up2date A protocol error occurred: Internal Server Error , attempt #5, [Thu Mar 18 19:30:37 2010] up2date Internal Server Error [Thu Mar 18 19:30:37 2010] up2date File "/usr/sbin/rhnreg_ks", line 404, in ? main() File "/usr/sbin/rhnreg_ks", line 359, in main rhnreg.sendHardware(systemId, hardwareList) File "/usr/share/rhn/up2date_client/rhnreg.py", line 569, in sendHardware rpcServer.doCall(s.registration.add_hw_profile, systemId, hardwareList) File "/usr/share/rhn/up2date_client/rpcServer.py", line 309, in doCall raise up2dateErrors.CommunicationError(e.errmsg) Expected results: Successful registration. Additional info: This event sent from IssueTracker by mpoole [Support Engineering Group] issue 726513
Using the following to get the data as seen by the registration code PYTHONPATH=/usr/share/rhn python -c "from up2date_client import hardware; print hardware.Hardware()" > /tmp/hardware-info.txt From a machine with no strange chars (after folding for clarity). { 'product': 'SUN FIRE X4150', 'vendor': 'Sun Microsystems', 'bios_vendor': 'American Megatrends Inc.', 'system': 'SUN FIRE X4150 Rev 50', 'bios_release': '11/05/2008', 'board': 'Sun Microsystems', 'bios_version': '1ADQW057', 'class': 'DMI', 'asset': '(chassis: 0000000000) (chassis: To Be Filled By O.E.M.) (board: 000000000000000000) (system: 0000000000) '}, on a machine with problems this looks like { 'product': ' ', 'vendor': '\x0c ', 'bios_vendor': 'American Megatrends Inc.', 'system': '\x0c \x0c ', 'bios_release': '11/05/2008', 'board': '\x0c ', 'bios_version': '1ADQW057', 'class': 'DMI', 'asset': '(board: ) '},
The problem is caused by the presence of the formfeed (and other xml-suspect characters) in the python string.printable set which is used as the filter for the dmidecode contents. In /usr/share/rhn/up2date_client/hardware.py towards the end of the read_dmi function it calls toascii = makefilter(string.printable) to create a filter to be applied to the contents. The set of characters passed to create this filter probably needs to be a slightly more restricted set than string.printable, possible the union of string.digits, string.letters, string.punctuation and the member of string.whitespace that are not problematic.
I do confirm this behaviour on RHEL5 as well.
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 presence of the "\f" character in the Desktop Management Interface (DMI) information or any non-ASCII character in the hardware name rendered the system unable to register to both Red Hat Network (RHN) and Red Hat Network Satellite Server. This error has been fixed, and the system registration now works as expected.
We find problem in https://bugzilla.redhat.com/show_bug.cgi?id=618267#c3 commit 16fddd9063c5a5dabce2b849416c5e0dddf3438e cherrypicked as rev 195242
Verified. # rpm -q up2date rhnlib up2date-4.9.1-29.el4 rhnlib-2.1.4-14.el4_8.3 Hardware profile info containing special characters like (c) or (r) is handled correctly and registration to satellite / hosted ends up successfully. Note: control characters like form-feed etc. are handled by rhnlib package, not up2date. # PYTHONPATH=/usr/share/rhn python -c "from up2date_client import hardware; from pprint import pprint; pprint(hardware.Hardware())" [{'bus': 'PCI', 'class': 'OTHER', 'desc': '"Dell Remote Access Card 4 Daughter Card SMIC interface\x02\x0f\x0e\xc2\xa1\xc3\xbf\x04\x05\x06\xc2\xa9\x0c\xc2\xae\x01\x12\x10"', 'detached': '0', 'deviceId': '0014', 'driver': 'unknown', 'pciType': '1', 'pcibus': '4', 'pcidev': '4', 'pcidom': '0', 'pcifn': '2', 'subDeviceId': '0014', 'subVendorId': '1028', 'vendorId': '1028'}, {'bus': 'PCI', 'class': 'OTHER', 'desc': '"Dell Remote Access Card 4 Daughter Card Virtual UART\x02\x0f\x0e\xc2\xa1\xc3\xbf\x04\x05\x06\xc2\xa9\x0c\xc2\xae\x01\x12\x10"', 'detached': '0', 'deviceId': '0012', 'driver': 'unknown', 'pciType': '1', 'pcibus': '4', 'pcidev': '4', 'pcidom': '0', 'pcifn': '1', 'subDeviceId': '0012', 'subVendorId': '1028', 'vendorId': '1028'}, ... ... ... # rhnreg_ks --serverUrl=... --username=... --password=... (No errors.) On server - Systems -> (system) -> Details -> Hardware: "Dell Remote Access Card 4 Daughter Card SMIC interface¡ÿ©®" "Dell Remote Access Card 4 Daughter Card Virtual UART¡ÿ©®" ... ... ...
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-0240.html