- bsc#941464 - virt-convert attempts to create storage pool images

even if it already exists
  virtinst-fix-storage-pool-lookup.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=247
This commit is contained in:
Charles Arnold 2015-08-12 22:07:31 +00:00 committed by Git OBS Bridge
parent d3a9e22f63
commit 7b90f23b72
3 changed files with 34 additions and 0 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Aug 12 15:22:52 MDT 2015 - carnold@suse.com
- bsc#941464 - virt-convert attempts to create storage pool images
even if it already exists
virtinst-fix-storage-pool-lookup.patch
-------------------------------------------------------------------
Mon Aug 10 11:58:32 MDT 2015 - carnold@suse.com

View File

@ -85,6 +85,7 @@ Patch160: virtinst-xen-drive-type.patch
Patch161: virtinst-xenbus-disk-index-fix.patch
Patch162: virtinst-refresh_before_fetch_pool.patch
Patch163: virtinst-replace-unar-with-other-archivers.patch
Patch164: virtinst-fix-storage-pool-lookup.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -213,6 +214,7 @@ machine).
%patch161 -p1
%patch162 -p1
%patch163 -p1
%patch164 -p1
%build
%if %{qemu_user}

View File

@ -0,0 +1,25 @@
References: bsc#941464
virt-convert fails when the storage pool is already present but
is not called 'default'.
If the 'default' pool has been removed but another pool uses the
default location of /var/lib/libvirt/images virt-convert will fail
to find the pool and attempt to create another one with the same
path. This causes the conversion to fail.
Index: virt-manager-1.2.1/virtinst/storage.py
===================================================================
--- virt-manager-1.2.1.orig/virtinst/storage.py
+++ virt-manager-1.2.1/virtinst/storage.py
@@ -209,10 +209,11 @@ class StoragePool(_StorageObject):
try:
pool = conn.storagePoolLookupByName(name)
except libvirt.libvirtError:
+ pool = StoragePool.lookup_pool_by_path(conn, path)
pass
if pool:
- return
+ return StoragePool(conn, parsexml=pool.XMLDesc(0))
try:
logging.debug("Attempting to build default pool with target '%s'",