Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#33876 - [libvirt,virt-manager] 1.0.2-2 & 1.0.2-3 Python bindings are missing error constants

Attached to Project: Community Packages
Opened by Marti (intgr) - Friday, 15 February 2013, 11:00 GMT
Last edited by Sergej Pupykin (sergej) - Thursday, 28 February 2013, 15:14 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description: libvirt version 1.0.2-1 was working ine, but 1.0.2-2 broke the Python bindings because some error constants like VIR_ERR_RPC have disappeared.

When I try to connect to an earlier libvirtd server using virt-manager, I get the error:
Exception in thread Tick thread:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 504, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/share/virt-manager/virtManager/engine.py", line 293, in _tick
conn.tick()
File "/usr/share/virt-manager/virtManager/connection.py", line 1311, in tick
self._tick(noStatsUpdate)
File "/usr/share/virt-manager/virtManager/connection.py", line 1332, in _tick
newInterfaces, self.interfaces) = self._update_interfaces()
File "/usr/share/virt-manager/virtManager/connection.py", line 1206, in _update_interfaces
lookup_func, build_class)
File "/usr/share/virt-manager/virtManager/connection.py", line 1112, in _poll_helper
if not check_support():
File "/usr/share/virt-manager/virtManager/connection.py", line 521, in is_interface_capable
virtinst.support.SUPPORT_CONN_INTERFACE)
File "/usr/lib/python2.7/site-packages/virtinst/support.py", line 582, in check_conn_support
return _check_support(conn, feature, conn)
File "/usr/lib/python2.7/site-packages/virtinst/support.py", line 487, in _check_support
check_all_error=bool(flag_tuple))
File "/usr/lib/python2.7/site-packages/virtinst/support.py", line 329, in _try_command
if is_error_nosupport(e):
File "/usr/lib/python2.7/site-packages/virtinst/support.py", line 570, in is_error_nosupport
if (err.get_error_code() == libvirt.VIR_ERR_RPC or
AttributeError: 'module' object has no attribute 'VIR_ERR_RPC'

I think this patch should fix it: https://www.redhat.com/archives/libvir-list/2013-February/msg00220.html


# pacman -U /var/cache/pacman/pkg/libvirt-1.0.2-1-x86_64.pkg.tar.xz
# grep VIR_ERR_AUTH_FAILED /usr/lib/python2.7/site-packages/libvirt.py
VIR_ERR_AUTH_FAILED = 45

# pacman -U /var/cache/pacman/pkg/libvirt-1.0.2-2-x86_64.pkg.tar.xz
# grep VIR_ERR_AUTH_FAILED /usr/lib/python2.7/site-packages/libvirt.py
[ nothing ]
This task depends upon

Closed by  Sergej Pupykin (sergej)
Thursday, 28 February 2013, 15:14 GMT
Reason for closing:  Fixed
Additional comments about closing:  1.0.3-rc2 uploaded
Comment by Jason Fergus (leech) - Friday, 22 February 2013, 13:09 GMT
This problem persists with libvirt 1.0.2-3 as well.
Comment by PT. Ma. (BOYPT) - Tuesday, 26 February 2013, 04:39 GMT
I suggest introduced patches as debian did in their libvirt-1.0.2-2:

https://launchpad.net/debian/+source/libvirt/1.0.2-2

They cherry-picked from upstream, there 2 patches in `debian/patches/upstream`:
complete-virterror-virerror-name-change.patch
Fix-missing-error-constants-in-libvirt-python-module.patch

But there's some interesting thing, the first is exactly the same as the one in arch libvirt-1.0.2-3, while, still causing problems, I applied only the second one, then everything works now. (at least an Arch KVM Host, a CentOS 6.3 Host, a bundle of Ubuntu 12.04 Hosts ...)
Comment by PT. Ma. (BOYPT) - Tuesday, 26 February 2013, 05:55 GMT
I have an update for the previous comment.

This patch works for listing and viewing virtual hosts:
Fix-missing-error-constants-in-libvirt-python-module.patch

But still I got another error on creating a new machine. I switch to libvirt-git already.

As 1.0.2 is a fully BROKEN version from upstream, I strongly suggest skip this version, stick up to 1.0.3 directly, 1.0.3 is already in RC1 stage, and it's obvious that it will be a bugfix version.

Loading...