Hello community,

here is the log from the commit of package virt-manager for openSUSE:Factory 
checked in at 2018-10-23 20:41:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/virt-manager (Old)
 and      /work/SRC/openSUSE:Factory/.virt-manager.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "virt-manager"

Tue Oct 23 20:41:09 2018 rev:182 rq:643838 version:1.5.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/virt-manager/virt-manager.changes        
2018-07-25 16:12:46.245882659 +0200
+++ /work/SRC/openSUSE:Factory/.virt-manager.new/virt-manager.changes   
2018-10-23 20:42:05.828421965 +0200
@@ -1,0 +2,6 @@
+Tue Oct 16 02:24:29 UTC 2018 - James Fehlig <jfeh...@suse.com>
+
+- Fix selection of network volumes (bsc#1100558)
+  5a7698c7-fix-select-network-vol.patch
+
+-------------------------------------------------------------------

New:
----
  5a7698c7-fix-select-network-vol.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ virt-manager.spec ++++++
--- /var/tmp/diff_new_pack.zoo6e9/_old  2018-10-23 20:42:06.860420732 +0200
+++ /var/tmp/diff_new_pack.zoo6e9/_new  2018-10-23 20:42:06.864420727 +0200
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -41,6 +41,7 @@
 Patch1:         27d4b167-virtinst-update-location-for-opensuse.patch
 Patch2:         d15b78ab-virtinst-read-CPU-model-from-domain-capabilities.patch
 Patch3:         fd6a8154-virtinst-compare-host-and-domain-cpu-models.patch
+Patch4:         5a7698c7-fix-select-network-vol.patch
 # SUSE Only
 Patch70:        virtman-desktop.patch
 Patch71:        virtman-kvm.patch
@@ -186,6 +187,7 @@
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 # SUSE Only
 %patch70 -p1
 %patch71 -p1

++++++ 5a7698c7-fix-select-network-vol.patch ++++++
commit 5a7698c7998d673e0742046478630824162966b4
Author: Jim Fehlig <jfeh...@suse.com>
Date:   Tue Oct 9 14:30:09 2018 -0600

    Fix selection of network volumes
    
    When creating a new VM and selecting a volume from a network-based
    storage pool such as rbd, the volume is not recognized as network-based
    and is treated as a volume from a directory storage pool.
    
    This patch adds a method to check if the volume's path points to a
    network-based volume, then uses the method to avoid actions like
    setting unix file permissions on the volume, which doesn't make
    sense for a network-based volume.
    
    Signed-off-by: Jim Fehlig <jfeh...@suse.com>
    
    (crobinso: rebase, tweak lookup logic)

Index: virt-manager-1.5.1/virtinst/diskbackend.py
===================================================================
--- virt-manager-1.5.1.orig/virtinst/diskbackend.py
+++ virt-manager-1.5.1/virtinst/diskbackend.py
@@ -156,7 +156,7 @@ def manage_path(conn, path):
     if not path:
         return None, None
 
-    if not path_is_url(path):
+    if not path_is_url(path) and not path_is_network_vol(conn, path):
         path = os.path.abspath(path)
     vol, pool = check_if_path_managed(conn, path)
     if vol or pool or not _can_auto_manage(path):
@@ -188,6 +188,19 @@ def path_is_url(path):
     return bool(re.match("[a-zA-Z]+(\+[a-zA-Z]+)?://.*", path))
 
 
+def path_is_network_vol(conn, path):
+    """
+    Detect if path is a network volume such as rbd, gluster, etc
+    """
+    if not path:
+        return False
+
+    for volxml in conn.fetch_all_vols():
+        if volxml.target_path == path:
+            return volxml.type == "network"
+    return False
+
+
 def _get_dev_type(path, vol_xml, vol_object, pool_xml, remote):
     """
     Try to get device type for volume.
Index: virt-manager-1.5.1/virtinst/devicedisk.py
===================================================================
--- virt-manager-1.5.1.orig/virtinst/devicedisk.py
+++ virt-manager-1.5.1/virtinst/devicedisk.py
@@ -216,6 +216,8 @@ class VirtualDisk(VirtualDevice):
             return []
         if diskbackend.path_is_url(path):
             return []
+        if diskbackend.path_is_network_vol(conn, path):
+            return []
 
         try:
             # Get UID for string name
++++++ virtinst-python2-to-python3-conversion.patch ++++++
--- /var/tmp/diff_new_pack.zoo6e9/_old  2018-10-23 20:42:06.984420584 +0200
+++ /var/tmp/diff_new_pack.zoo6e9/_new  2018-10-23 20:42:06.984420584 +0200
@@ -325,7 +325,7 @@
  
  
  class _Host(XMLBuilder):
-@@ -453,7 +453,7 @@ class VirtualDisk(VirtualDevice):
+@@ -455,7 +455,7 @@ class VirtualDisk(VirtualDevice):
                  digit = 1
  
              seen_valid = True
@@ -334,7 +334,7 @@
  
          return gen_t
  
-@@ -1054,11 +1054,11 @@ class VirtualDisk(VirtualDevice):
+@@ -1056,11 +1056,11 @@ class VirtualDisk(VirtualDevice):
          def get_target():
              first_found = None
  
@@ -554,7 +554,7 @@
 ===================================================================
 --- virt-manager-1.5.1.orig/virtinst/diskbackend.py
 +++ virt-manager-1.5.1/virtinst/diskbackend.py
-@@ -391,7 +391,7 @@ class CloneStorageCreator(_StorageCreato
+@@ -404,7 +404,7 @@ class CloneStorageCreator(_StorageCreato
          else:
              vfs = os.statvfs(os.path.dirname(self._path))
              avail = vfs.f_frsize * vfs.f_bavail
@@ -563,7 +563,7 @@
          if need > avail:
              if self._sparse:
                  msg = _("The filesystem will not have enough free space"
-@@ -411,7 +411,7 @@ class CloneStorageCreator(_StorageCreato
+@@ -424,7 +424,7 @@ class CloneStorageCreator(_StorageCreato
          text = (_("Cloning %(srcfile)s") %
                  {'srcfile': os.path.basename(self._input_path)})
  

++++++ virtinst-use-qemu-for-cdrom-device.patch ++++++
--- /var/tmp/diff_new_pack.zoo6e9/_old  2018-10-23 20:42:07.004420560 +0200
+++ /var/tmp/diff_new_pack.zoo6e9/_new  2018-10-23 20:42:07.004420560 +0200
@@ -2,11 +2,11 @@
 When the device added is a cdrom device (/dev/sr0), don't use
 "phy" as the driver name but instead use "qemu".
 
-Index: virt-manager-1.5.0/virtinst/devicedisk.py
+Index: virt-manager-1.5.1/virtinst/devicedisk.py
 ===================================================================
---- virt-manager-1.5.0.orig/virtinst/devicedisk.py
-+++ virt-manager-1.5.0/virtinst/devicedisk.py
-@@ -561,7 +561,8 @@ class VirtualDisk(VirtualDevice):
+--- virt-manager-1.5.1.orig/virtinst/devicedisk.py
++++ virt-manager-1.5.1/virtinst/devicedisk.py
+@@ -563,7 +563,8 @@ class VirtualDisk(VirtualDevice):
          # Recommended xen defaults from here:
          # https://bugzilla.redhat.com/show_bug.cgi?id=1171550#c9
          # If type block, use name=phy. Otherwise do the same as qemu

++++++ virtinst-xen-drive-type.patch ++++++
--- /var/tmp/diff_new_pack.zoo6e9/_old  2018-10-23 20:42:07.012420550 +0200
+++ /var/tmp/diff_new_pack.zoo6e9/_new  2018-10-23 20:42:07.012420550 +0200
@@ -2,11 +2,11 @@
 Virt-manager on Xen doesn't fill in any type thereby defaulting to
 'raw'. This patch will generate the correct XML on Xen.
 
-Index: virt-manager-1.5.0/virtinst/devicedisk.py
+Index: virt-manager-1.5.1/virtinst/devicedisk.py
 ===================================================================
---- virt-manager-1.5.0.orig/virtinst/devicedisk.py
-+++ virt-manager-1.5.0/virtinst/devicedisk.py
-@@ -579,6 +579,10 @@ class VirtualDisk(VirtualDevice):
+--- virt-manager-1.5.1.orig/virtinst/devicedisk.py
++++ virt-manager-1.5.1/virtinst/devicedisk.py
+@@ -581,6 +581,10 @@ class VirtualDisk(VirtualDevice):
          http://lists.gnu.org/archive/html/qemu-devel/2008-04/msg00675.html
          """
          if self.driver_name != self.DRIVER_NAME_QEMU:

++++++ virtinst-xenbus-disk-index-fix.patch ++++++
--- /var/tmp/diff_new_pack.zoo6e9/_old  2018-10-23 20:42:07.024420536 +0200
+++ /var/tmp/diff_new_pack.zoo6e9/_new  2018-10-23 20:42:07.028420531 +0200
@@ -6,11 +6,11 @@
 passed to qemu where it error'ed out with the disks having the same
 index (in this case both are 0).
 
-Index: virt-manager-1.5.0/virtinst/devicedisk.py
+Index: virt-manager-1.5.1/virtinst/devicedisk.py
 ===================================================================
---- virt-manager-1.5.0.orig/virtinst/devicedisk.py
-+++ virt-manager-1.5.0/virtinst/devicedisk.py
-@@ -1036,6 +1036,17 @@ class VirtualDisk(VirtualDevice):
+--- virt-manager-1.5.1.orig/virtinst/devicedisk.py
++++ virt-manager-1.5.1/virtinst/devicedisk.py
+@@ -1038,6 +1038,17 @@ class VirtualDisk(VirtualDevice):
          @rtype C{str}
          """
          prefix, maxnode = self.get_target_prefix(skip_targets)
@@ -28,7 +28,7 @@
          skip_targets = [t for t in skip_targets if t and t.startswith(prefix)]
          skip_targets.sort()
  
-@@ -1049,7 +1060,12 @@ class VirtualDisk(VirtualDevice):
+@@ -1051,7 +1062,12 @@ class VirtualDisk(VirtualDevice):
                  ran = range(pref_ctrl * 7, (pref_ctrl + 1) * 7)
  
              for i in ran:


Reply via email to