From 7b90f23b722bc845e98fdcd9873e7ca1e150fefa Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Wed, 12 Aug 2015 22:07:31 +0000 Subject: [PATCH] - 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 --- virt-manager.changes | 7 +++++++ virt-manager.spec | 2 ++ virtinst-fix-storage-pool-lookup.patch | 25 +++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 virtinst-fix-storage-pool-lookup.patch diff --git a/virt-manager.changes b/virt-manager.changes index e1c48e07..220be0c4 100644 --- a/virt-manager.changes +++ b/virt-manager.changes @@ -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 diff --git a/virt-manager.spec b/virt-manager.spec index b56cbce5..e1293bd4 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -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} diff --git a/virtinst-fix-storage-pool-lookup.patch b/virtinst-fix-storage-pool-lookup.patch new file mode 100644 index 00000000..b1447292 --- /dev/null +++ b/virtinst-fix-storage-pool-lookup.patch @@ -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'",