Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 453398 - Python traceback on addition of a guest
Summary: Python traceback on addition of a guest
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 0.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Pradeep Kilambi
QA Contact: Red Hat Satellite QA List
: 462576 (view as bug list)
Depends On:
Blocks: space02
TreeView+ depends on / blocked
Reported: 2008-06-30 12:44 UTC by Rob See
Modified: 2009-09-17 06:59 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-09-17 06:59:23 UTC

Attachments (Terms of Use)

Description Rob See 2008-06-30 12:44:58 UTC
Description of problem:
While trying to make use of the rhn-virt-guest and rhn-virt-host client pieces,
I run into a python traceback on the spacewalk server:
Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/server/", line 120, in call_function
    response = apply(func, params)
  File "/usr/share/rhn/server/handlers/xmlrpc/", line 1109, in
    rhnVirtualization._virt_notify(server_id, actions)
  File "/usr/share/rhn/server/", line 844, in _virt_notify
    handler.handle(server_id, action)
  File "/usr/share/rhn/server/", line 217, in handle
    handler(system_id, timestamp, properties)
  File "/usr/share/rhn/server/", line 267, in
  File "/usr/share/rhn/server/", line 784, in __notify_listeners
  File "/usr/share/rhn/server/", line 1028, in _notify
  File "/usr/share/rhn/server/", line 1038, in guest_migrated
  File "/usr/share/rhn/server/rhnSQL/", line 181, in __call__
    proc = self._implementor.__call__(self._name)
TypeError: Procedure() takes exactly 1 argument (2 given)

How reproducible:
I have 3 groups of host/guest that are experiencing this problem

Steps to Reproduce:
1. install rhn-virt-guest on guests
2. install rhn-virt-host on hosts
3. run rhn-profile-sync on host
4. wait for traceback email to arrive to spacewalk admin
Actual results:
Guests are not linked correctly to the host machine in the webgui

Expected results:
Guests showing as linked to their host.

Additional info:

Comment 1 Rob See 2008-06-30 12:46:29 UTC
The server is running CentOS 5.2 i386, the client machines are running a
combination of Cent 5.2 i386 and Cent 5.2 x86_64

Comment 2 Rob See 2008-06-30 14:26:16 UTC
This may or may not be related, but I'm also seeing the following error messages from:
python /usr/share/rhn/virtualization/ (run from cron on the hosts)

libvir: Remote error : No such file or directory
libvir: warning : Failed to find the network: Is the daemon running ?
libvir: Remote error : No such file or directory
libvir: warning : Failed to find the network: Is the daemon running ?

Which seem to happen because /var/run/libvirt/libvirt-sock does not exist. The only files I have in this 
directory are qemud-sock and qemud-sock-ro

Comment 3 Rob See 2008-06-30 14:31:43 UTC
ok, so this looks like it is not related... it was happening because libvirtd wasn't running on the hosts.

Comment 4 Rob See 2008-07-01 20:16:31 UTC
Had a python guy I know look at this... Its caused by a difference between 2.3
and 2.4/2.5. Can be worked around by changing 
def Procedure(name): => 
def Procedure(cls,name): 
def Function(name, ret_type): =>
def Function(cls, name, ret_type):

in rhnSQL/ 

Comment 5 Jon 2008-07-02 17:49:24 UTC
I can confirm that I have the same problem on Centos 5.1 running

Comment 6 Rob See 2008-07-02 17:49:48 UTC
Updated version that should actually fix the problem (in an ugly way) and not
break other stuff.
Replace these two functions in /usr/share/rhn/server/rhnSQL/

# wrapper for a Procedure callable class
def Procedure(name,extra=None):
    if extra:
        name = extra
    db = __test_DB()
    return db.procedure(name)

# wrapper for a Procedure callable class
def Function(name, ret_type, extra=None):
    if extra:
    db = __test_DB()
    return db.function(name, ret_type)

Comment 8 John Matthews 2008-09-12 14:20:31 UTC
Verified, below is the procedure I followed.

On Spacewalk 0.2 running on RHEL5.2 with rhel5 vt channel

Registered a RHEL5.2 pv-host to SW 0.2
Created a Kickstart profile for a RHEL5.2 pv-guest, associated an activation key for base channel rhel-5-server with no entitlements.

Kickstarted the guest from SW 0.2.

Guest was created successfully.

Comment 9 Pradeep Kilambi 2008-09-22 11:51:18 UTC
*** Bug 462576 has been marked as a duplicate of this bug. ***

Comment 10 Miroslav Suchý 2009-09-17 06:59:23 UTC
Spacewalk is released for long time.

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