[virt-tools-list] VirtInstall - error validating install location / global name 'virGetLastError' is not defined
Daniel P. Berrange
berrange at redhat.com
Fri Mar 1 15:42:17 UTC 2013
On Fri, Mar 01, 2013 at 02:24:52PM +0000, Bogdan Rădulescu wrote:
> Hi,
>
> I compiled libvirt form the latest git right now and I still see the same
> problem.
Then I presume it is not using the new build and still finding
your old install. If building from GIT you must use the right
args to ./configure to ensure it overrides any files instaled
by your distro. Usually something like
--prefix=/usr --localstatedir=/var --sysconfdir=/etc
but not sure if this is correct for slackware.
> On Fri, Mar 1, 2013 at 1:26 PM, Daniel P. Berrange <berrange at redhat.com>wrote:
>
> > On Fri, Mar 01, 2013 at 11:12:28AM +0000, Bogdan Rădulescu wrote:
> > > [Vi, 01 mar 2013 13:07:34 virt-install 16102] ERROR (cli:438) global name
> > > 'virGetLastError' is not defined
> > > [Vi, 01 mar 2013 13:07:34 virt-install 16102] DEBUG (cli:441)
> > > Traceback (most recent call last):
> > > File "/usr/bin/virt-install", line 1015, in <module>
> > > sys.exit(main())
> > > File "/usr/bin/virt-install", line 1000, in main
> > > guest = build_guest_instance(conn, options)
> > > File "/usr/bin/virt-install", line 529, in build_guest_instance
> > > options.disksize, options.sparse, need_storage)
> > > File "/usr/bin/virt-install", line 164, in get_disks
> > > get_disk(disklist[idx], sizelist[idx], sparse, guest, is_file_path)
> > > File "/usr/bin/virt-install", line 137, in get_disk
> > > dev, size = cli.parse_disk(guest, diskopts)
> > > File "/usr/lib64/python2.7/site-packages/virtinst/cli.py", line 1610,
> > in
> > > parse_disk
> > > format=fmt)
> > > File "/usr/lib64/python2.7/site-packages/virtinst/VirtualDisk.py", line
> > > 659, in __init__
> > > self.vol_install)
> > > File "/usr/lib64/python2.7/site-packages/virtinst/VirtualDisk.py", line
> > > 974, in __change_storage
> > > path)
> > > File "/usr/lib64/python2.7/site-packages/virtinst/VirtualDisk.py", line
> > > 182, in _check_if_path_managed
> > > vol = lookup_vol_by_path()[0]
> > > File "/usr/lib64/python2.7/site-packages/virtinst/VirtualDisk.py", line
> > > 164, in lookup_vol_by_path
> > > vol = conn.storageVolLookupByPath(path)
> > > File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3387, in
> > > storageVolLookupByPath
> > > if ret is None:raise libvirtError('virStorageVolLookupByPath()
> > failed',
> > > conn=self)
> > > File "/usr/lib64/python2.7/site-packages/libvirt.py", line 35, in
> > __init__
> > > err = virGetLastError()
> > > NameError: global name 'virGetLastError' is not
> > > defined
> > >
> > > ERROR global name 'virGetLastError' is not defined
> >
> > This is a bug in the 1.0.2 version of libvirt. I guess the slackware
> > maintainers deployed that version without backporting the bug fix for
> > it :-( File a bug with slackware asking them to apply the following
> > two patches from upstream
> >
> > commit 25ea8e47e74def560bf89cd94dd54b75ca5ff4d6
> > Author: Daniel P. Berrange <berrange at redhat.com>
> > 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 at redhat.com>
> >
> > commit a6b8bae5a6a4752926eba409202ec061d81c6c8a
> > Author: Serge Hallyn <serge.hallyn at canonical.com>
> > 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 at ubuntu.com>
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the virt-tools-list
mailing list