Bug 453398 - Python traceback on addition of a guest
Python traceback on addition of a guest
Product: Spacewalk
Classification: Community
Component: Server (Show other bugs)
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Pradeep Kilambi
Red Hat Satellite QA List
: 462576 (view as bug list)
Depends On:
Blocks: space02
  Show dependency treegraph
Reported: 2008-06-30 08:44 EDT by Rob See
Modified: 2009-09-17 02:59 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 02:59:23 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 Rob See 2008-06-30 08:44:58 EDT
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/apacheRequest.py", line 120, in call_function
    response = apply(func, params)
  File "/usr/share/rhn/server/handlers/xmlrpc/registration.py", line 1109, in
    rhnVirtualization._virt_notify(server_id, actions)
  File "/usr/share/rhn/server/rhnVirtualization.py", line 844, in _virt_notify
    handler.handle(server_id, action)
  File "/usr/share/rhn/server/rhnVirtualization.py", line 217, in handle
    handler(system_id, timestamp, properties)
  File "/usr/share/rhn/server/rhnVirtualization.py", line 267, in
  File "/usr/share/rhn/server/rhnVirtualization.py", line 784, in __notify_listeners
  File "/usr/share/rhn/server/rhnVirtualization.py", line 1028, in _notify
  File "/usr/share/rhn/server/rhnVirtualization.py", line 1038, in guest_migrated
  File "/usr/share/rhn/server/rhnSQL/__init__.py", 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 08:46:29 EDT
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 10:26:16 EDT
This may or may not be related, but I'm also seeing the following error messages from:
python /usr/share/rhn/virtualization/poller.py (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 10:31:43 EDT
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 16:16:31 EDT
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/__init__.py 
Comment 5 Jon 2008-07-02 13:49:24 EDT
I can confirm that I have the same problem on Centos 5.1 running
Comment 6 Rob See 2008-07-02 13:49:48 EDT
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/__init__.py

# 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 10:20:31 EDT
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 07:51:18 EDT
*** Bug 462576 has been marked as a duplicate of this bug. ***
Comment 10 Miroslav Suchý 2009-09-17 02:59:23 EDT
Spacewalk is released for long time.

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