virt-manager/a0ca387a-cli-Fix-pool-default-when-path-belongs-to-another-pool.patch
Charles Arnold 2d558399a0 - Upstream bug fixes (bsc#1027942)
57db4185-virt-clone-fix-force-copy-of-empty-cdrom-or-floppy-disk.patch
  26a433fc-virtManager-clone-check-which-storage-pools-supports-volume-cloning.patch
  4f66c423-cloner-Handle-nonsparse-for-qcow2-images.patch
  a02fc0d0-virtManager-clone-build-default-clone-path-if-we-know-how.patch
  1856c1fa-support-Fix-minimum-version-check.patch
  74bbc3db-urldetect-Check-also-for-treeinfo.patch
  708af01c-osdict-Add-supports_virtioinput.patch
  f23b01be-guest-Add-VirtIO-input-devices-to-s390x-guests-with-graphics.patch
  7afbb90b-virt-xml-Handle-VM-names-that-look-like-id-uuid.patch
  a0ca387a-cli-Fix-pool-default-when-path-belongs-to-another-pool.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=465
2019-04-03 17:16:11 +00:00

32 lines
1.3 KiB
Diff

Subject: cli: Fix pool=default when path belongs to another pool (bz 1692489)
From: Cole Robinson crobinso@redhat.com Tue Mar 26 10:44:58 2019 -0400
Date: Tue Mar 26 11:15:46 2019 -0400:
Git: a0ca387aad0fde19683aa8b5b5636add6455b8b4
Using 'virt-install --disk size=X' implicitly uses pool=default. If
a pool named 'default' exists we use that; if not, and a pool using
the default path exists under a different name, we attempt to use
that as well, and if that doesn't exist, we create pool=default
The second case is broken, so if there's no pool=default and eg.
pool=FOO points to /var/lib/libvirt/images, we still attempt to
look up pool=default which understandably fails
https://bugzilla.redhat.com/show_bug.cgi?id=1692489
Index: virt-manager-2.1.0/virtinst/cli.py
===================================================================
--- virt-manager-2.1.0.orig/virtinst/cli.py
+++ virt-manager-2.1.0/virtinst/cli.py
@@ -2263,7 +2263,9 @@ class ParserDisk(VirtCLIParser):
poolobj = None
if poolname:
if poolname == "default":
- StoragePool.build_default_pool(self.guest.conn)
+ poolxml = StoragePool.build_default_pool(self.guest.conn)
+ if poolxml:
+ poolname = poolxml.name
poolobj = self.guest.conn.storagePoolLookupByName(poolname)
if volname: