Bug 909734 - libvirt-1.0.2 breaks backward compatibility with older libvirt hosts
Summary: libvirt-1.0.2 breaks backward compatibility with older libvirt hosts
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2013-02-10 19:46 UTC by Stijn Tintel
Modified: 2013-02-11 20:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-02-11 07:37:25 UTC

Attachments (Terms of Use)

Description Stijn Tintel 2013-02-10 19:46:57 UTC
Description of problem:
Starting with libvirt-1.0.2, I am experiencing problems connecting to older libvirt hosts. On my workstation (Gentoo x86_64), I am running libvirt-1.0.2 and virt-manager 0.9.4.

I am able to connect virt-manager via SSH to a CentOS 6.3 host running libvirt-0.9.10-21.el6_3.8.x86_64, and all VMs are listed. When I try to open any VM window, I get an error.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. install libvirt 1.0.2
2. connect virt-manager to an EL6 host with libvirt-0.9.10-21.el6_3.8.x86_64
3. try to open a VM window
Actual results:
Error window pops up with these details:
Error launching details: 'module' object has no attribute 'VIR_ERR_ERROR'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/engine.py", line 594, in _show_vm_helper
    details = self._get_details_dialog(uri, uuid)
  File "/usr/share/virt-manager/virtManager/engine.py", line 573, in _get_details_dialog
    obj = vmmDetails(con.get_vm(uuid))
  File "/usr/share/virt-manager/virtManager/details.py", line 528, in __init__
  File "/usr/share/virt-manager/virtManager/details.py", line 1446, in refresh_vm_state
  File "/usr/share/virt-manager/virtManager/details.py", line 2712, in _refresh_runtime_pinning
    util.tooltip_wrapper(vcpu_list, reason or None)
  File "/usr/share/virt-manager/virtManager/util.py", line 145, in tooltip_wrapper
    import gtk
  File "/usr/share/virt-manager/virtManager/cli.py", line 75, in libvirt_callback
    if err[3] != libvirt.VIR_ERR_ERROR:
AttributeError: 'module' object has no attribute 'VIR_ERR_ERROR'

Expected results:
Open VM window where I can see the VM console, change VM settings etc.

Additional info:
- When connecting virt-manager via SSH to a CentOS 5 box with libvirt-0.8.2-29.el5.x86_64, virt-manager shows no VMs at all. Could this be caused by the same bug, or should I file another bug for this?
- I do not have this problem with libvirt-1.0.1 and virt-manager-0.9.4

Comment 1 Jiri Denemark 2013-02-11 07:37:25 UTC
Unfortunately, 1.0.2 was released with a bug in python bindings generator, which means python bindings from 1.0.2 are broken. It should be already fixed in upstream git. The following two commits are the ones that fix this issue; you can try to manually apply them or wait for Cardoe to make a new ebuild with these patches backported.

commit 25ea8e47e74def560bf89cd94dd54b75ca5ff4d6
Author: Daniel P. Berrange <berrange>
Date:   Tue Feb 5 12:55:09 2013 +0000

    Fix missing error constants in libvirt python module
    The previous change to the generator, changed too much - only
    the functions are in 'virerror.c', the constants remained in
    'virerror.h' which could not be renamed for API compat reasons.
    Add a test case to sanity check the generated python bindings
    Signed-off-by: Daniel P. Berrange <berrange>

commit a6b8bae5a6a4752926eba409202ec061d81c6c8a
Author: Serge Hallyn <serge.hallyn>
Date:   Wed Jan 30 21:05:45 2013 -0600

    complete virterror->virerror name change
    Without these two string changes in generator.py, the
    virGetLastError wrapper does not get created in
    /usr/share/pyshared/libvirt.py.  Noticed when running
    tests with virt-install.
    Signed-off-by: Serge Hallyn <serge.hallyn>

Comment 2 Stijn Tintel 2013-02-11 20:29:24 UTC
Ah, good that this is already known. I Googled the error but couldn't find anything useful, that's why I reported it here with severity = urgent.

The oldest of the patches you mention already seems to be in the -r1 ebuild, but the newer one isn't. I added it myself, remerged libvirt and now I can open the VM windows again.

Thanks for the quick repsonse.

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