Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package virt-manager for openSUSE:Factory 
checked in at 2023-01-29 14:10:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/virt-manager (Old)
 and      /work/SRC/openSUSE:Factory/.virt-manager.new.32243 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "virt-manager"

Sun Jan 29 14:10:11 2023 rev:240 rq:1061650 version:4.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/virt-manager/virt-manager.changes        
2022-11-29 10:52:59.728686170 +0100
+++ /work/SRC/openSUSE:Factory/.virt-manager.new.32243/virt-manager.changes     
2023-01-29 14:21:48.022594138 +0100
@@ -1,0 +2,16 @@
+Fri Jan 20 11:20:21 MST 2023 - carn...@suse.com
+
+- bsc#1207070 - libvirt fails to start the guest once the new
+  shared disk is added, with the error, "cannot get 'write'
+  permission without 'resize' image size is not a multiple of
+  request alignment"
+  virtman-fix-shared-disk-request-alignment-error.patch
+
+-------------------------------------------------------------------
+Thu Jan  5 10:45:46 MST 2023 - carn...@suse.com
+
+- Replace downstream patch with upstream version (bsc#1203252)
+  67832d30-addhardware-Fix-backtrace-when-controller-index-is-None.patch
+  Drop virtman-fix-uninitialized-controller-index.patch
+
+-------------------------------------------------------------------

Old:
----
  virtman-fix-uninitialized-controller-index.patch

New:
----
  67832d30-addhardware-Fix-backtrace-when-controller-index-is-None.patch
  virtman-fix-shared-disk-request-alignment-error.patch

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

Other differences:
------------------
++++++ virt-manager.spec ++++++
--- /var/tmp/diff_new_pack.xnQ2Q7/_old  2023-01-29 14:21:48.858598672 +0100
+++ /var/tmp/diff_new_pack.xnQ2Q7/_new  2023-01-29 14:21:48.866598715 +0100
@@ -1,7 +1,7 @@
 #
 # spec file
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -51,6 +51,7 @@
 Patch8:         fbdf0516-cli-cpu-Add-maxphysaddr.mode-bits-options.patch
 Patch9:         b0d05167-cloner-Sync-uuid-and-sysinfo-system-uuid.patch
 Patch10:        999ccb85-virt-install-unattended-and-cloud-init-conflict.patch
+Patch11:        
67832d30-addhardware-Fix-backtrace-when-controller-index-is-None.patch
 # SUSE Only
 Patch70:        virtman-desktop.patch
 Patch71:        virtman-kvm.patch
@@ -84,7 +85,6 @@
 Patch158:       virtman-disallow-adding-floppy-disk.patch
 Patch159:       virtman-register-delete-event-for-details-dialog.patch
 Patch160:       virtman-revert-use-of-AyatanaAppIndicator3.patch
-Patch161:       virtman-fix-uninitialized-controller-index.patch
 Patch170:       virtinst-xen-drive-type.patch
 Patch171:       virtinst-xenbus-disk-index-fix.patch
 Patch172:       virtinst-refresh_before_fetch_pool.patch
@@ -100,6 +100,7 @@
 Patch182:       virtinst-add-sle-hpc-support.patch
 Patch183:       virtinst-add-oracle-linux-support.patch
 Patch184:       virtinst-windows-server-detection.patch
+Patch185:       virtman-fix-shared-disk-request-alignment-error.patch
 
 BuildArch:      noarch
 

++++++ 67832d30-addhardware-Fix-backtrace-when-controller-index-is-None.patch 
++++++
Subject: addhardware: Fix backtrace when controller.index is None
From: Cole Robinson crobi...@redhat.com Tue Dec 13 13:49:35 2022 -0500
Date: Tue Dec 13 13:49:35 2022 -0500:
Git: 67832d3097cd6451833c30452d6991896e05933c

When creating a new VM, in the customize wizard we can't depend on
index= value being set (virtinst doesn't do it for example).

For example, this causes a backtrace when adding two virtio-scsi
controllers via the Customize wizard, or adding an extra
virtio-scsi controller to an aarch64 CDROM install.

Reported-by: Charles Arnold <carn...@suse.com>
Signed-off-by: Cole Robinson <crobi...@redhat.com>

--- a/virtManager/addhardware.py
+++ b/virtManager/addhardware.py
@@ -1560,7 +1560,7 @@ class vmmAddHardware(vmmGObjectUI):
         controller_num = [x for x in controllers if
                 (x.type == controller_type)]
         if len(controller_num) > 0:
-            index_new = max([x.index for x in controller_num]) + 1
+            index_new = max(int(x.index or 0) for x in controller_num) + 1
             dev.index = index_new
 
         dev.type = controller_type

++++++ virtman-fix-shared-disk-request-alignment-error.patch ++++++
References: bsc#1207070

When creating a raw disk that is marked as 'shared', libvirt
will round the allocation amount higher to a 4k boundary.
This results in the qemu error shown below passed back to libvirt.
Note that only raw disks can be marked shared (not qcow2)
but the rounding should not harm qcow2 disks.

libvirt.libvirtError: internal error: qemu unexpectedly closed the monitor: 
2023-01-19T21:40:28.507063Z qemu-system-x86_64:
-device 
{"driver":"virtio-blk-pci","bus":"pci.8","addr":"0x0","share-rw":true,"drive":"libvirt-1-format","id":"virtio-disk1","write-cache":"on"}:
Cannot get 'write' permission without 'resize': Image size is not a multiple of 
request alignment


Index: virt-manager-4.1.0/virtManager/createvol.py
===================================================================
--- virt-manager-4.1.0.orig/virtManager/createvol.py
+++ virt-manager-4.1.0/virtManager/createvol.py
@@ -246,7 +246,13 @@ class vmmCreateVolume(vmmGObjectUI):
         vol = self._make_stub_vol()
         vol.name = volname
         vol.capacity = (cap * 1024 * 1024 * 1024)
+        if vol.capacity:
+            # If a raw disk is marked 'shared', round up for libvirt
+            vol.capacity -= vol.capacity % -4096
         vol.allocation = (alloc * 1024 * 1024 * 1024)
+        if vol.allocation:
+            vol.allocation -= vol.allocation % -4096
+
         if backing:
             vol.backing_store = backing
         if fmt:
Index: virt-manager-4.1.0/virtinst/devices/disk.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/devices/disk.py
+++ virt-manager-4.1.0/virtinst/devices/disk.py
@@ -361,6 +361,9 @@ class DeviceDisk(Device):
                       volname, poolobj.name())
 
         cap = (size * 1024 * 1024 * 1024)
+        if cap:
+            # If a raw disk is marked 'shared', round up for libvirt
+            cap -= cap % -4096
         if sparse:
             alloc = 0
         else:

Reply via email to