Bug 459254 - Cannot register guest on old host
Summary: Cannot register guest on old host
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 0.6
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space02
TreeView+ depends on / blocked
 
Reported: 2008-08-15 12:38 UTC by Miroslav Suchý
Modified: 2009-09-17 07:00 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-09-17 07:00:06 UTC
Embargoed:


Attachments (Terms of Use)

Description Miroslav Suchý 2008-08-15 12:38:14 UTC
+++ 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'):

Comment 1 Miroslav Suchý 2008-08-15 12:45:10 UTC
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

Comment 2 Devan Goodwin 2008-09-05 16:43:53 UTC
[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.

Comment 3 Miroslav Suchý 2009-09-17 07:00:06 UTC
Spacewalk is released for long time.


Note You need to log in before you can comment on or make changes to this bug.