Bug 246720

Summary: Cannot register guest on old host
Product: Red Hat Satellite 5 Reporter: Miroslav Suchý <msuchy>
Component: VirtualizationAssignee: Miroslav Suchý <msuchy>
Status: CLOSED CURRENTRELEASE QA Contact: Milan Zázrivec <mzazrivec>
Severity: low Docs Contact:
Priority: low    
Version: 500CC: bperkins, cperry, jbrownin
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sat530 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-10 18:29:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 456985, 507280    
Attachments:
Description Flags
Traceback
none
Traceback from 421 upgraded to 500 none

Description Miroslav Suchý 2007-07-04 12:46:18 UTC
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.

Comment 1 Miroslav Suchý 2007-07-04 12:46:18 UTC
Created attachment 158517 [details]
Traceback

Comment 3 Miroslav Suchý 2007-08-01 09:49:25 UTC
Created attachment 160402 [details]
Traceback from 421 upgraded to 500

I installed satellite 4.2.1, register host, upgraded sat to 5.0.0, register
guest on the same host. And still got traceback (but registration proceed ok
from client side).

Comment 4 Miroslav Suchý 2007-08-01 10:00:25 UTC
Due to BZ 245311 I need to post another comment to change status back from NEEDINFO.

Comment 5 Miroslav Suchý 2007-08-01 12:33:35 UTC
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:

Comment 7 Fedora Update System 2008-01-31 17:51:46 UTC
system-config-firewall-1.0.12-4.fc8 has been submitted as an update for Fedora 8

Comment 8 Fedora Update System 2008-02-02 01:18:14 UTC
system-config-firewall-1.0.12-4.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update system-config-firewall'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-1200

Comment 9 Brandon Perkins 2008-04-10 02:33:28 UTC
Changed status to ASSIGNED as Fedora Update System should not have changed this.

Comment 10 Nick Strugnell 2008-07-04 14:36:02 UTC
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 11 Miroslav Suchý 2008-08-15 12:49:19 UTC
Fixed in Spacewlk bug 459254.

Comment 12 Brandon Perkins 2008-08-28 03:10:19 UTC
Removing bug 459254 blocks bug 246720.

Comment 13 Milan Zázrivec 2009-07-08 14:37:45 UTC
Registered host, upgraded satellite, registered guest, no traceback, verified.

Comment 14 Brandon Perkins 2009-09-10 18:29:23 UTC
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/RHEA-2009-1434.html