Description of problem: If there are any systems registered to Satellite with no BIOS information stored in the system profile, then the entitlement-check.py satellite-upgrade script will fail: # cd /etc/sysconfig/rhn/satellite-upgrade # ./entitlement-check.py --rhn-cert=/<path>/<cert> Traceback (most recent call last): File "./entitlement-check.py", line 312, in ? main() File "./entitlement-check.py", line 75, in main (to_convert, cant_convert) = recognize_guests.get_guest_lists() File "/etc/sysconfig/rhn/satellite-upgrade/recognize_guests.py", line 199, in get_guest_lists if virt_type is None and smbios['smbios.bios.vendor'].lower() == 'xen': AttributeError: 'NoneType' object has no attribute 'lower' Changing recognize_guests.py to check for the existence of smbios['smbios.bios.vendor'] resolves the issue: - if virt_type is None and smbios['smbios.bios.vendor'].lower() == 'xen': + if virt_type is None and smbios['smbios.bios.vendor'] and smbios['smbios.bios.vendor'].lower() == 'xen': Version-Release number of selected component (if applicable): rhn-upgrade-5.4.0.21-1.el5sat How reproducible: 100% if flex guest candidates have no SMBIOS fields set. Steps to Reproduce: I don't know how it was originally caused on the customer database, but something like the following should do it: 1. Register a Red Hat Enterprise Linux 5.1 KVM or Xen guest to Satellite 5.3. The guest's host system should not be registered. 2. Delete the bios_vendor field value from the rhnServerDMI table in the Oracle database, for that system profile. 3. Install or update rhn-upgrade to the latest version, and run the script /etc/sysconfig/rhn/satellite-upgrade/entitlement-check.py --rhn-cert=/<path>/<cert>, where <cert> is a 5.4 certificate that includes flex guest entitlements. Actual results: The above traceback error. Expected results: No traceback error. Additional info:
74986fcb50ed744f32428c89a26cbe78982848f9 Now handle null values correctly
e7c3d99a9a29a53066405e88f5d6d95f625b16fa Handling an empty query properly now.
Please be so kind and add a few key words to the field Technical Notes (Cause, Consequence, Fix, Result) in this Bugzilla entry. In Future, you do not need to write long explanations for the erratum if you answer these questions. Many thanks, Florian
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: Cause: What actions or circumstances cause this bug to present? Consequence: What happens when the bug presents? Fix: What was done to fix the bug? Result: What now happens when the actions or circumstances above occur? (this is not the same as the bug doesn’t present anymore)
Text that I added directly into the errata: Previously, running recognize_guests.py script as a part of Satellite upgrade procedure might have failed with an error in situations where the registered guest hardware information in the database lacked several smbios fields. Running recognize_guests.py now no longer returns error in these circumstances.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,7 +1,7 @@ Cause: What actions or circumstances cause this bug to present? -Consequence: What happens when the bug presents? +Consequence: Previously,the recognize_guests.py script as a part of the Satellite upgrade procedure could fail in situations where the registered guest hardware information in the database lacked several smbios fields. Fix: What was done to fix the bug? -Result: What now happens when the actions or circumstances above occur? (this is not the same as the bug doesn’t present anymore)+Result: Running recognize_guests.py now no longer returns error in these circumstances. (this is not the same as the bug doesn’t present anymore)
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-0208.html