+++ This bug was initially created as a clone of Bug #246720 +++ Description of problem: I have XEN host. It was registered to Satellite (4.9). Satellite was then upgraded to 500 and when I try to register new guest running on thist host, I got traceback. Version-Release number of selected component (if applicable): 500 How reproducible: done twice Steps to Reproduce: 1. take older satellite < 500 2. register XEN host to this satellite 3. upgrade satellite 4. register guest to this satellite Actual results: Traceback (see attachment) Expected results: register system Additional info: If I delete profile and reregister host, the guest is registered without problem. --- Additional comment from msuchy on 2007-08-01 08:33:35 EDT --- With this patch it works: --- /usr/share/rhn/server/rhnVirtualization.py.orig 2007-08-01 14:14:45.000000000 +0200 +++ /usr/share/rhn/server/rhnVirtualization.py 2007-08-01 14:18:26.000000000 +0200 @@ -594,7 +594,7 @@ new_values_array = [] bindings = {} - if not existing_row['confirmed']: + if not existing_row.has_key('confirmed'): new_values_array.append('confirmed=1') if existing_row['host_system_id'] != host_id: --- Additional comment from nstrug on 2008-07-04 10:36:02 EDT --- note that the following syntax: if not existing_row['confirmed']: is used a few times, not just here. We should really check the code throughout as this is a python coding error. Should be: if not existing_row.has_key('confirmed'): -or- if not existing_row.get('confirmed'):
I searched code and find only one more line. I put there: if not existing_row.get('confirmed'): as it is more readable. commited as 1efca5bdb4f32993faa8e7e51231930dffd95c1f
[root@rlx-3-12 rhn]# grep -r existing_row * | grep confirmed server/rhnVirtualization.py: if not existing_row.get('confirmed'): server/rhnVirtualization.py: if not existing_row.get('confirmed'): [root@rlx-3-12 rhn]# Cannot test this fully in spacewalk 0.2 as there is no upgrade path from Satellite 4.9. Regardless marking verified in spacewalk 0.2 based on code changes, verification of the original ticket this was cloned from will cover the rest.
Spacewalk is released for long time.