Bug 459254 - Cannot register guest on old host
Cannot register guest on old host
Product: Spacewalk
Classification: Community
Component: Server (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Miroslav Suchý
Red Hat Satellite QA List
Depends On:
Blocks: space02
  Show dependency treegraph
Reported: 2008-08-15 08:38 EDT by Miroslav Suchý
Modified: 2009-09-17 03:00 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-17 03:00:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Miroslav Suchý 2008-08-15 08:38:14 EDT
+++ 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):

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@redhat.com 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'):

         if existing_row['host_system_id'] != host_id:

--- Additional comment from nstrug@redhat.com 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'):
if not existing_row.get('confirmed'):
Comment 1 Miroslav Suchý 2008-08-15 08:45:10 EDT
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 12:43:53 EDT
[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 03:00:06 EDT
Spacewalk is released for long time.

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