- Drop virtinst-fix-storage-pool-lookup.patch in favor of upstream

version (bsc#941464).
  eb92178e-virtinst-fix-storage-pool-lookup.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=252
This commit is contained in:
Charles Arnold 2015-09-02 20:04:59 +00:00 committed by Git OBS Bridge
parent 0e7e6567ce
commit a67df0f6e9
5 changed files with 29 additions and 11 deletions

View File

@ -1,4 +1,8 @@
References: bsc#941464 Subject: storage: fix default storage pool lookup
From: Charles Arnold carnold@suse.com Wed Aug 12 16:00:14 2015 -0600
Date: Mon Aug 31 18:25:37 2015 -0400:
Git: eb92178e0c208c20c658dd3f38caf377bb788ae4
virt-convert fails when the storage pool is already present but virt-convert fails when the storage pool is already present but
is not called 'default'. is not called 'default'.
@ -6,19 +10,26 @@ If the 'default' pool has been removed but another pool uses the
default location of /var/lib/libvirt/images virt-convert will fail default location of /var/lib/libvirt/images virt-convert will fail
to find the pool and attempt to create another one with the same to find the pool and attempt to create another one with the same
path. This causes the conversion to fail. path. This causes the conversion to fail.
Index: virt-manager-1.2.1/virtinst/storage.py
=================================================================== Signed-off-by: Charles Arnold <carnold@suse.com>
--- virt-manager-1.2.1.orig/virtinst/storage.py
+++ virt-manager-1.2.1/virtinst/storage.py (crobinso: Remove now-redundant 'pass')
@@ -209,10 +209,11 @@ class StoragePool(_StorageObject):
diff --git a/virtinst/storage.py b/virtinst/storage.py
index 285acb8..d3d867a 100644
--- a/virtinst/storage.py
+++ b/virtinst/storage.py
@@ -209,10 +209,12 @@ class StoragePool(_StorageObject):
try: try:
pool = conn.storagePoolLookupByName(name) pool = conn.storagePoolLookupByName(name)
except libvirt.libvirtError: except libvirt.libvirtError:
- pass
+ # Try default pool path when "default" name fails
+ pool = StoragePool.lookup_pool_by_path(conn, path) + pool = StoragePool.lookup_pool_by_path(conn, path)
pass
if pool: if pool:
- return - return
+ # This is a libvirt pool object so create a StoragePool from it
+ return StoragePool(conn, parsexml=pool.XMLDesc(0)) + return StoragePool(conn, parsexml=pool.XMLDesc(0))
try: try:

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Aug 31 16:41:28 MDT 2015 - carnold@suse.com
- Drop virtinst-fix-storage-pool-lookup.patch in favor of upstream
version (bsc#941464).
eb92178e-virtinst-fix-storage-pool-lookup.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Aug 26 15:32:59 MDT 2015 - carnold@suse.com Wed Aug 26 15:32:59 MDT 2015 - carnold@suse.com

View File

@ -45,6 +45,7 @@ Patch5: a9b303fb-fix-copy-host-cpu-definition.patch
Patch6: f81358b0-dont-display-error-if-machine-is-missing-in-XML.patch Patch6: f81358b0-dont-display-error-if-machine-is-missing-in-XML.patch
Patch7: aebebbf8-report-an-error-for-pxe-install-without-network.patch Patch7: aebebbf8-report-an-error-for-pxe-install-without-network.patch
Patch8: 4970615f-fix-qemu-vs-lxc-detection.patch Patch8: 4970615f-fix-qemu-vs-lxc-detection.patch
Patch9: eb92178e-virtinst-fix-storage-pool-lookup.patch
# SUSE Only # SUSE Only
Patch70: virtman-desktop.patch Patch70: virtman-desktop.patch
Patch71: virtman-kvm.patch Patch71: virtman-kvm.patch
@ -85,7 +86,6 @@ Patch160: virtinst-xen-drive-type.patch
Patch161: virtinst-xenbus-disk-index-fix.patch Patch161: virtinst-xenbus-disk-index-fix.patch
Patch162: virtinst-refresh_before_fetch_pool.patch Patch162: virtinst-refresh_before_fetch_pool.patch
Patch163: virtinst-replace-unar-with-other-archivers.patch Patch163: virtinst-replace-unar-with-other-archivers.patch
Patch164: virtinst-fix-storage-pool-lookup.patch
BuildArch: noarch BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -178,6 +178,7 @@ machine).
%patch6 -p1 %patch6 -p1
%patch7 -p1 %patch7 -p1
%patch8 -p1 %patch8 -p1
%patch9 -p1
# SUSE Only # SUSE Only
%patch70 -p1 %patch70 -p1
%patch71 -p1 %patch71 -p1
@ -218,7 +219,6 @@ machine).
%patch161 -p1 %patch161 -p1
%patch162 -p1 %patch162 -p1
%patch163 -p1 %patch163 -p1
%patch164 -p1
%build %build
%if %{qemu_user} %if %{qemu_user}

View File

@ -3,7 +3,7 @@ Index: virt-manager-1.2.1/virtinst/storage.py
=================================================================== ===================================================================
--- virt-manager-1.2.1.orig/virtinst/storage.py --- virt-manager-1.2.1.orig/virtinst/storage.py
+++ virt-manager-1.2.1/virtinst/storage.py +++ virt-manager-1.2.1/virtinst/storage.py
@@ -447,7 +447,7 @@ class StoragePool(_StorageObject): @@ -449,7 +449,7 @@ class StoragePool(_StorageObject):
def list_formats(self): def list_formats(self):
if self.type == self.TYPE_FS: if self.type == self.TYPE_FS:
return ["auto", "ext2", "ext3", "ext4", "ufs", "iso9660", "udf", return ["auto", "ext2", "ext3", "ext4", "ufs", "iso9660", "udf",

View File

@ -8,7 +8,7 @@ Index: virt-manager-1.2.1/virtinst/storage.py
=================================================================== ===================================================================
--- virt-manager-1.2.1.orig/virtinst/storage.py --- virt-manager-1.2.1.orig/virtinst/storage.py
+++ virt-manager-1.2.1/virtinst/storage.py +++ virt-manager-1.2.1/virtinst/storage.py
@@ -716,6 +716,11 @@ class StorageVolume(_StorageObject): @@ -718,6 +718,11 @@ class StorageVolume(_StorageObject):
lazy_refcounts = XMLProperty("./target/features/lazy_refcounts", lazy_refcounts = XMLProperty("./target/features/lazy_refcounts",
is_bool=True, default_cb=_lazy_refcounts_default_cb) is_bool=True, default_cb=_lazy_refcounts_default_cb)