Bug 453398
| Summary: | Python traceback on addition of a guest | ||
|---|---|---|---|
| Product: | [Community] Spacewalk | Reporter: | Rob See <rob> |
| Component: | Server | Assignee: | Pradeep Kilambi <pkilambi> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Red Hat Satellite QA List <satqe-list> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 0.1 | CC: | jmatthew, wayne.dovey |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2009-09-17 06:59: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: | 456550 | ||
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 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 ok, so this looks like it is not related... it was happening because libvirtd wasn't running on the hosts. 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): and def Function(name, ret_type): => def Function(cls, name, ret_type): in rhnSQL/__init__.py I can confirm that I have the same problem on Centos 5.1 running python-2.4.3-19.el5. 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:
name,ret_type=ret_type,extra
db = __test_DB()
return db.function(name, ret_type)
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. *** Bug 462576 has been marked as a duplicate of this bug. *** Spacewalk is released for long time. |
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 virt_notify 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 _handle_domain_exists uuid) File "/usr/share/rhn/server/rhnVirtualization.py", line 784, in __notify_listeners listener._notify(*args) File "/usr/share/rhn/server/rhnVirtualization.py", line 1028, in _notify self.guest_migrated(*args) File "/usr/share/rhn/server/rhnVirtualization.py", line 1038, in guest_migrated procedure.rhn_entitlements.repoll_virt_guest_entitlements(new_host_sid) 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: