Debian Bug report logs - #700077
python-libvirt causes 'virGetLastError() not defined' errors in virt-manager

version graph

Package: python-libvirt; Maintainer for python-libvirt is Guido Günther <agx@sigxcpu.org>; Source for python-libvirt is src:libvirt-python.

Reported by: Francois Gouget <fgouget@free.fr>

Date: Fri, 8 Feb 2013 10:09:01 UTC

Severity: important

Tags: patch

Found in version libvirt/1.0.2-1

Fixed in version libvirt/1.0.2-2

Done: Guido Günther <agx@sigxcpu.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Libvirt Maintainers <pkg-libvirt-maintainers@lists.alioth.debian.org>:
Bug#700077; Package python-libvirt. (Fri, 08 Feb 2013 10:09:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Francois Gouget <fgouget@free.fr>:
New Bug report received and forwarded. Copy sent to Debian Libvirt Maintainers <pkg-libvirt-maintainers@lists.alioth.debian.org>. (Fri, 08 Feb 2013 10:09:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Francois Gouget <fgouget@free.fr>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: python-libvirt causes 'virGetLastError() not defined' errors in virt-manager
Date: Fri, 08 Feb 2013 11:04:17 +0100
Package: python-libvirt
Version: 1.0.2-1
Severity: important
Tags: patch

Dear Maintainer,

After upgrading to python-libvirt 1.0.2-1 from experimental virt-manager was unable to open my local VMs (it could still open remote VMs strangely enough). The error I got was:

Error launching details: global name 'virGetLastError' is not defined

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/engine.py", line 606, in _show_vm_helper
    details.show()
  File "/usr/share/virt-manager/virtManager/details.py", line 564, in show
    self.refresh_vm_state()
  File "/usr/share/virt-manager/virtManager/details.py", line 1405, in refresh_vm_state
    self.change_run_text(vm.hasSavedImage())
  File "/usr/share/virt-manager/virtManager/domain.py", line 1115, in hasSavedImage
    return self._backend.hasManagedSaveImage(0)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 800, in hasManagedSaveImage
    if ret == -1: raise libvirtError ('virDomainHasManagedSaveImage() failed', dom=self)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 35, in __init__
    err = virGetLastError()
NameError: global name 'virGetLastError' is not defined

I traced it back to /usr/lib/python2.7/dist-packages/libvirt.py and the patch below fixes the issue for me:

--- /usr/lib/python2.7/dist-packages/libvirt.py.orig    2013-01-30 22:34:48.000000000 +0100
+++ /usr/lib/python2.7/dist-packages/libvirt.py 2013-02-07 18:19:58.013527296 +0100
@@ -32,7 +32,7 @@
 
         # Never call virConnGetLastError().
         # virGetLastError() is now thread local
-        err = virGetLastError()
+        err = libvirtmod.virGetLastError()
         if err is None:
             msg = defmsg
         else:


Note that it's likely the same patch should be applied to /usr/lib/python2.6/dist-packages/libvirt.py for users on Python 2.6.
Just for reference, I currently have virt-manager 0.9.3-2.

-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-libvirt depends on:
ii  libaudit0           1:1.7.18-1.1
ii  libavahi-client3    0.6.31-1
ii  libavahi-common3    0.6.31-1
ii  libc6               2.13-37
ii  libcap-ng0          0.6.6-2
ii  libdbus-1-3         1.6.8-1
ii  libdevmapper1.02.1  2:1.02.74-4
ii  libgcrypt11         1.5.0-3
ii  libgnutls26         2.12.20-4
ii  libnl-3-200         3.2.7-4
ii  libnl-route-3-200   3.2.7-4
ii  libnuma1            2.0.8~rc4-1
ii  libsasl2-2          2.1.25.dfsg1-6
ii  libvirt0            1.0.2-1
ii  libxml2             2.8.0+dfsg1-7
ii  libyajl2            2.0.4-2
ii  python              2.7.3~rc2-1

Versions of packages python-libvirt recommends:
ii  libvirt-bin  1.0.2-1

python-libvirt suggests no packages.

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Libvirt Maintainers <pkg-libvirt-maintainers@lists.alioth.debian.org>:
Bug#700077; Package python-libvirt. (Fri, 08 Feb 2013 10:33:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guido Günther <agx@sigxcpu.org>:
Extra info received and forwarded to list. Copy sent to Debian Libvirt Maintainers <pkg-libvirt-maintainers@lists.alioth.debian.org>. (Fri, 08 Feb 2013 10:33:05 GMT) Full text and rfc822 format available.

Message #10 received at 700077@bugs.debian.org (full text, mbox):

From: Guido Günther <agx@sigxcpu.org>
To: Francois Gouget <fgouget@free.fr>, 700077@bugs.debian.org
Subject: Re: [Pkg-libvirt-maintainers] Bug#700077: python-libvirt causes 'virGetLastError() not defined' errors in virt-manager
Date: Fri, 8 Feb 2013 11:31:04 +0100
On Fri, Feb 08, 2013 at 11:04:17AM +0100, Francois Gouget wrote:
> Package: python-libvirt
> Version: 1.0.2-1
> Severity: important
> Tags: patch
> 
> Dear Maintainer,
> 
> After upgrading to python-libvirt 1.0.2-1 from experimental virt-manager was unable to open my local VMs (it could still open remote VMs strangely enough). The error I got was:

Yes. That's a known issues in the python bindings of 1.0.2 already fixed
upsteam. I didn't get around to pull the patch yet.
 -- Guido

> 
> Error launching details: global name 'virGetLastError' is not defined
> 
> Traceback (most recent call last):
>   File "/usr/share/virt-manager/virtManager/engine.py", line 606, in _show_vm_helper
>     details.show()
>   File "/usr/share/virt-manager/virtManager/details.py", line 564, in show
>     self.refresh_vm_state()
>   File "/usr/share/virt-manager/virtManager/details.py", line 1405, in refresh_vm_state
>     self.change_run_text(vm.hasSavedImage())
>   File "/usr/share/virt-manager/virtManager/domain.py", line 1115, in hasSavedImage
>     return self._backend.hasManagedSaveImage(0)
>   File "/usr/lib/python2.7/dist-packages/libvirt.py", line 800, in hasManagedSaveImage
>     if ret == -1: raise libvirtError ('virDomainHasManagedSaveImage() failed', dom=self)
>   File "/usr/lib/python2.7/dist-packages/libvirt.py", line 35, in __init__
>     err = virGetLastError()
> NameError: global name 'virGetLastError' is not defined
> 
> I traced it back to /usr/lib/python2.7/dist-packages/libvirt.py and the patch below fixes the issue for me:
> 
> --- /usr/lib/python2.7/dist-packages/libvirt.py.orig    2013-01-30 22:34:48.000000000 +0100
> +++ /usr/lib/python2.7/dist-packages/libvirt.py 2013-02-07 18:19:58.013527296 +0100
> @@ -32,7 +32,7 @@
>  
>          # Never call virConnGetLastError().
>          # virGetLastError() is now thread local
> -        err = virGetLastError()
> +        err = libvirtmod.virGetLastError()
>          if err is None:
>              msg = defmsg
>          else:
> 
> 
> Note that it's likely the same patch should be applied to /usr/lib/python2.6/dist-packages/libvirt.py for users on Python 2.6.
> Just for reference, I currently have virt-manager 0.9.3-2.
> 
> -- System Information:
> Debian Release: 7.0
>   APT prefers testing
>   APT policy: (990, 'testing'), (500, 'stable')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
> 
> Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
> Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> 
> Versions of packages python-libvirt depends on:
> ii  libaudit0           1:1.7.18-1.1
> ii  libavahi-client3    0.6.31-1
> ii  libavahi-common3    0.6.31-1
> ii  libc6               2.13-37
> ii  libcap-ng0          0.6.6-2
> ii  libdbus-1-3         1.6.8-1
> ii  libdevmapper1.02.1  2:1.02.74-4
> ii  libgcrypt11         1.5.0-3
> ii  libgnutls26         2.12.20-4
> ii  libnl-3-200         3.2.7-4
> ii  libnl-route-3-200   3.2.7-4
> ii  libnuma1            2.0.8~rc4-1
> ii  libsasl2-2          2.1.25.dfsg1-6
> ii  libvirt0            1.0.2-1
> ii  libxml2             2.8.0+dfsg1-7
> ii  libyajl2            2.0.4-2
> ii  python              2.7.3~rc2-1
> 
> Versions of packages python-libvirt recommends:
> ii  libvirt-bin  1.0.2-1
> 
> python-libvirt suggests no packages.
> 
> -- no debconf information
> 
> _______________________________________________
> Pkg-libvirt-maintainers mailing list
> Pkg-libvirt-maintainers@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-libvirt-maintainers
> 



Reply sent to Guido Günther <agx@sigxcpu.org>:
You have taken responsibility. (Fri, 08 Feb 2013 14:51:06 GMT) Full text and rfc822 format available.

Notification sent to Francois Gouget <fgouget@free.fr>:
Bug acknowledged by developer. (Fri, 08 Feb 2013 14:51:06 GMT) Full text and rfc822 format available.

Message #15 received at 700077-close@bugs.debian.org (full text, mbox):

From: Guido Günther <agx@sigxcpu.org>
To: 700077-close@bugs.debian.org
Subject: Bug#700077: fixed in libvirt 1.0.2-2
Date: Fri, 08 Feb 2013 14:48:13 +0000
Source: libvirt
Source-Version: 1.0.2-2

We believe that the bug you reported is fixed in the latest version of
libvirt, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 700077@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guido Günther <agx@sigxcpu.org> (supplier of updated libvirt package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Fri, 08 Feb 2013 14:04:08 +0100
Source: libvirt
Binary: libvirt-bin libvirt0 libvirt0-dbg libvirt-doc libvirt-dev python-libvirt libvirt-sanlock
Architecture: source all i386
Version: 1.0.2-2
Distribution: experimental
Urgency: low
Maintainer: Debian Libvirt Maintainers <pkg-libvirt-maintainers@lists.alioth.debian.org>
Changed-By: Guido Günther <agx@sigxcpu.org>
Description: 
 libvirt-bin - programs for the libvirt library
 libvirt-dev - development files for the libvirt library
 libvirt-doc - documentation for the libvirt library
 libvirt-sanlock - library for interfacing with different virtualization systems
 libvirt0   - library for interfacing with different virtualization systems
 libvirt0-dbg - library for interfacing with different virtualization systems
 python-libvirt - libvirt Python bindings
Closes: 700077
Changes: 
 libvirt (1.0.2-2) experimental; urgency=low
 .
   * [7e3ee2f] Cherry-pick upstream fixes for Python bindings (Closes: #700077)
Checksums-Sha1: 
 78893ec7453714319e37b1887fff783781337ef8 2515 libvirt_1.0.2-2.dsc
 377b02dadbc4d4a329c70c6979d48e33322ae213 39295 libvirt_1.0.2-2.debian.tar.gz
 b67cded42f818b99424b697435dc49803ad6a3ba 2689324 libvirt-doc_1.0.2-2_all.deb
 33f73b429dfa895fb0f74c83d303f0307231b400 4765390 libvirt-bin_1.0.2-2_i386.deb
 21b6a837d77e1a04bb819f587f0f57523f947c26 2534820 libvirt0_1.0.2-2_i386.deb
 6f2962b83a5d446a21261dbfedb8de614993f293 10598710 libvirt0-dbg_1.0.2-2_i386.deb
 ad14a67239d3e26d5c300a8775383666f1e2db79 2915590 libvirt-dev_1.0.2-2_i386.deb
 6baff7281d120a8c73fdd547c6006fad6880a7c4 1905696 python-libvirt_1.0.2-2_i386.deb
 cfab6391b19d6c918647d18cff3c4e40ae700401 1525396 libvirt-sanlock_1.0.2-2_i386.deb
Checksums-Sha256: 
 f6b6c0a9ff4a373a123e709d9694f559dd66a6031c08ca6958a3d4f81218fbdc 2515 libvirt_1.0.2-2.dsc
 6e275ae07b408ec0b380edb89d81645fcd72e4eaaa3a8b206969e51832088b81 39295 libvirt_1.0.2-2.debian.tar.gz
 058f6c3fffcdc10f169ad087d98cddf22d72a29733d885fa11ee7a9498f9617b 2689324 libvirt-doc_1.0.2-2_all.deb
 801ee59cae940e10aa0af7bfffe09f804719fe9a7762f69e9edd4ed753b4c7f4 4765390 libvirt-bin_1.0.2-2_i386.deb
 8b3da01360c03411044ff6a6065d7f65cea866d52492db261e90183e74880d52 2534820 libvirt0_1.0.2-2_i386.deb
 384bb871f8f3d2af59b9e6af44674ea752b1beb625fa3f6909bf905f5dd2e3b2 10598710 libvirt0-dbg_1.0.2-2_i386.deb
 045c4f33ae16b87bc6b232ea2b131a57aaac8f76182a8d8aa8ba0bfa87e9841c 2915590 libvirt-dev_1.0.2-2_i386.deb
 59dad7be47039711500576d3de888c0b017dd0a05ab825c43b9ff75d6b2ab0cc 1905696 python-libvirt_1.0.2-2_i386.deb
 f482f6e04a0015037f96d59eb63791685c835c281e485d957c6ff3ee795704d4 1525396 libvirt-sanlock_1.0.2-2_i386.deb
Files: 
 8eb8ff89fefe3e6460da4b1ea5e4ec30 2515 libs optional libvirt_1.0.2-2.dsc
 0f6c8a535aabe6989eb221af75b4dbc9 39295 libs optional libvirt_1.0.2-2.debian.tar.gz
 722b70735a5a0413d032d6d5383e14ae 2689324 doc optional libvirt-doc_1.0.2-2_all.deb
 d68519eb2aecdf33ce61c5da3d38f6b6 4765390 admin optional libvirt-bin_1.0.2-2_i386.deb
 7b831db3a2c580cce355f0899288c7c8 2534820 libs optional libvirt0_1.0.2-2_i386.deb
 0f877f81c2ca9dcf838f37183c704179 10598710 debug extra libvirt0-dbg_1.0.2-2_i386.deb
 89545487fea8caa62b119a807e28b31d 2915590 libdevel optional libvirt-dev_1.0.2-2_i386.deb
 9a391889577638a96f19168994a500c7 1905696 python optional python-libvirt_1.0.2-2_i386.deb
 cc1c7375e74492993b74896a8d6524f1 1525396 libs extra libvirt-sanlock_1.0.2-2_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iD8DBQFRFQHan88szT8+ZCYRAhnbAJ91u+I9E+8evnjoKUlzYMrUrRDjYgCcDafl
QASsOR5lNqU24LqALqaQ/JM=
=kkN8
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 09 Mar 2013 07:31:15 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 09:20:32 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.