!49 [sync] PR-48: virt-manager upgrade to version 4.1.0-7
From: @openeuler-sync-bot Reviewed-by: @jxy_git Signed-off-by: @jxy_git
This commit is contained in:
commit
00e68fe71b
26
backport-cli-Drop-unnecessary-disk-prop-aliases.patch
Normal file
26
backport-cli-Drop-unnecessary-disk-prop-aliases.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 4b150735720d8a54c153e10a1bc760d252594004 Mon Sep 17 00:00:00 2001
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Wed, 17 Aug 2022 10:27:36 -0400
|
||||
Subject: [PATCH] cli: Drop unnecessary --disk prop aliases
|
||||
|
||||
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
||||
---
|
||||
virtinst/cli.py | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/virtinst/cli.py b/virtinst/cli.py
|
||||
index 042b500f..388c5263 100644
|
||||
--- a/virtinst/cli.py
|
||||
+++ b/virtinst/cli.py
|
||||
@@ -3497,8 +3497,6 @@ class ParserDisk(VirtCLIParser):
|
||||
"driver.io": "io",
|
||||
"driver.name": "driver_name",
|
||||
"driver.type": "driver_type",
|
||||
- "driver.metadata_cache.max_size": "metadata_cache.max_size",
|
||||
- "driver.metadata_cache.max_size.unit": "metadata_cache.max_size.unit",
|
||||
}
|
||||
|
||||
def _add_advertised_aliases(self):
|
||||
--
|
||||
2.43.0
|
||||
|
||||
106
backport-cli-disk-Add-driver.metadata_cache-options.patch
Normal file
106
backport-cli-disk-Add-driver.metadata_cache-options.patch
Normal file
@ -0,0 +1,106 @@
|
||||
From 11a887ece5b5bab287ff77b09337dc44c4e6e976 Mon Sep 17 00:00:00 2001
|
||||
From: Lin Ma <lma@suse.com>
|
||||
Date: Tue, 16 Aug 2022 12:59:57 +0800
|
||||
Subject: [PATCH] cli: --disk: Add driver.metadata_cache options
|
||||
|
||||
Properly setting the metadata cache size can provide better performance
|
||||
in case of using big qcow2 images.
|
||||
|
||||
This patch introduces two driver options:
|
||||
* driver.metadata_cache.max_size
|
||||
* driver.metadata_cache.max_size.unit
|
||||
|
||||
E.g. --disk ...,driver.type=qcow2,\
|
||||
driver.metadata_cache.max_size=2,\
|
||||
driver.metadata_cache.max_size.unit=MiB
|
||||
|
||||
BTW, Metadata cache size control is currently supported only for qcow2.
|
||||
Regarding how to properly caluclate the cache size of qcow2, Please refer
|
||||
to qemu's documentation.
|
||||
|
||||
Signed-off-by: Lin Ma <lma@suse.com>
|
||||
---
|
||||
tests/data/cli/compare/virt-install-many-devices.xml | 9 +++++++++
|
||||
tests/test_cli.py | 1 +
|
||||
virtinst/cli.py | 7 +++++++
|
||||
virtinst/devices/disk.py | 5 +++++
|
||||
4 files changed, 22 insertions(+)
|
||||
|
||||
diff --git a/tests/data/cli/compare/virt-install-many-devices.xml b/tests/data/cli/compare/virt-install-many-devices.xml
|
||||
index a73343a9..a33dc16a 100644
|
||||
--- a/tests/data/cli/compare/virt-install-many-devices.xml
|
||||
+++ b/tests/data/cli/compare/virt-install-many-devices.xml
|
||||
@@ -423,6 +423,15 @@
|
||||
</source>
|
||||
<target dev="vdu" bus="virtio"/>
|
||||
</disk>
|
||||
+ <disk type="file" device="disk">
|
||||
+ <driver name="qemu" type="qcow2">
|
||||
+ <metadata_cache>
|
||||
+ <max_size unit="KiB">2048</max_size>
|
||||
+ </metadata_cache>
|
||||
+ </driver>
|
||||
+ <source file="/tmp/disk1.qcow2"/>
|
||||
+ <target dev="vdv" bus="virtio"/>
|
||||
+ </disk>
|
||||
<controller type="usb" index="0" model="ich9-ehci1">
|
||||
<address type="pci" domain="0" bus="0" slot="4" function="7"/>
|
||||
</controller>
|
||||
diff --git a/tests/test_cli.py b/tests/test_cli.py
|
||||
index 774db098..259ac78c 100644
|
||||
--- a/tests/test_cli.py
|
||||
+++ b/tests/test_cli.py
|
||||
@@ -605,6 +605,7 @@ source.reservations.managed=no,source.reservations.source.type=unix,source.reser
|
||||
--disk path=/fooroot.img,size=.0001,transient=on
|
||||
--disk source.dir=/
|
||||
--disk type=nvme,source.type=pci,source.managed=no,source.namespace=2,source.address.domain=0x0001,source.address.bus=0x02,source.address.slot=0x00,source.address.function=0x0
|
||||
+--disk /tmp/disk1.qcow2,size=16,driver.type=qcow2,driver.metadata_cache.max_size=2048,driver.metadata_cache.max_size.unit=KiB
|
||||
|
||||
|
||||
--network user,mac=12:34:56:78:11:22,portgroup=foo,link_state=down,rom_bar=on,rom_file=/tmp/foo
|
||||
diff --git a/virtinst/cli.py b/virtinst/cli.py
|
||||
index c4dffd34..042b500f 100644
|
||||
--- a/virtinst/cli.py
|
||||
+++ b/virtinst/cli.py
|
||||
@@ -3497,6 +3497,8 @@ class ParserDisk(VirtCLIParser):
|
||||
"driver.io": "io",
|
||||
"driver.name": "driver_name",
|
||||
"driver.type": "driver_type",
|
||||
+ "driver.metadata_cache.max_size": "metadata_cache.max_size",
|
||||
+ "driver.metadata_cache.max_size.unit": "metadata_cache.max_size.unit",
|
||||
}
|
||||
|
||||
def _add_advertised_aliases(self):
|
||||
@@ -3696,6 +3698,11 @@ class ParserDisk(VirtCLIParser):
|
||||
cls.add_arg("driver.queues", "driver_queues")
|
||||
cls.add_arg("driver.error_policy", "error_policy")
|
||||
|
||||
+ cls.add_arg("driver.metadata_cache.max_size",
|
||||
+ "driver_metadata_cache_max_size")
|
||||
+ cls.add_arg("driver.metadata_cache.max_size.unit",
|
||||
+ "driver_metadata_cache_max_size_unit")
|
||||
+
|
||||
cls.add_arg("iotune.read_bytes_sec", "iotune_rbs")
|
||||
cls.add_arg("iotune.write_bytes_sec", "iotune_wbs")
|
||||
cls.add_arg("iotune.total_bytes_sec", "iotune_tbs")
|
||||
diff --git a/virtinst/devices/disk.py b/virtinst/devices/disk.py
|
||||
index dc59fd13..9609ebac 100644
|
||||
--- a/virtinst/devices/disk.py
|
||||
+++ b/virtinst/devices/disk.py
|
||||
@@ -481,6 +481,11 @@ class DeviceDisk(Device):
|
||||
driver_iothread = XMLProperty("./driver/@iothread", is_int=True)
|
||||
driver_queues = XMLProperty("./driver/@queues", is_int=True)
|
||||
|
||||
+ driver_metadata_cache_max_size = XMLProperty(
|
||||
+ "./driver/metadata_cache/max_size", is_int=True)
|
||||
+ driver_metadata_cache_max_size_unit = XMLProperty(
|
||||
+ "./driver/metadata_cache/max_size/@unit")
|
||||
+
|
||||
error_policy = XMLProperty("./driver/@error_policy")
|
||||
serial = XMLProperty("./serial")
|
||||
wwn = XMLProperty("./wwn")
|
||||
--
|
||||
2.37.2.windows.2
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
From 58f5e36da76277bfc7fb4d87293be60ef6e0cbc1 Mon Sep 17 00:00:00 2001
|
||||
From: Lin Ma <lma@suse.com>
|
||||
Date: Tue, 16 Aug 2022 12:59:36 +0800
|
||||
Subject: [PATCH] fsdetails: Fix an error with source.socket of virtiofs
|
||||
|
||||
Using the source.socket of virtiofs needs a virtiofsd daemon launched
|
||||
outside of libvirtd, So the filesystem UI doesn't support it yet. If
|
||||
users need it they can set it manually in the XML editor.
|
||||
But if we view the filesystem info of such a VM on the details page,
|
||||
It fails with this error message:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "/usr/share/virt-manager/virtManager/details/details.py", line 1713, in _refresh_page
|
||||
self._refresh_filesystem_page(dev)
|
||||
File "/usr/share/virt-manager/virtManager/details/details.py", line 2241, in _refresh_filesystem_page
|
||||
self.fsDetails.set_dev(dev)
|
||||
File "/usr/share/virt-manager/virtManager/device/fsdetails.py", line 193, in set_dev
|
||||
self.widget("fs-source").set_text(dev.source)
|
||||
TypeError: Argument 1 does not allow None as a value
|
||||
|
||||
This patch fixes above issue by leaving the 'source path' info blank in
|
||||
case of source.socket.
|
||||
In this case, Considering that showing 'target path' info without source
|
||||
info is kind of meaningless, So this patch leaves the 'target path' info
|
||||
blank as well.
|
||||
|
||||
Signed-off-by: Lin Ma <lma@suse.com>
|
||||
---
|
||||
virtManager/device/fsdetails.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/virtManager/device/fsdetails.py b/virtManager/device/fsdetails.py
|
||||
index 40868d1c..b9956e1d 100644
|
||||
--- a/virtManager/device/fsdetails.py
|
||||
+++ b/virtManager/device/fsdetails.py
|
||||
@@ -190,7 +190,7 @@ class vmmFSDetails(vmmGObjectUI):
|
||||
self.widget("fs-format-combo"), dev.driver_format)
|
||||
|
||||
if dev.type != DeviceFilesystem.TYPE_RAM:
|
||||
- self.widget("fs-source").set_text(dev.source)
|
||||
+ self.widget("fs-source").set_text(dev.source or "")
|
||||
else:
|
||||
self.widget("fs-ram-source-spin").set_value(int(dev.source) // 1024)
|
||||
self.widget("fs-target").set_text(dev.target or "")
|
||||
--
|
||||
2.37.2.windows.2
|
||||
|
||||
@ -0,0 +1,26 @@
|
||||
From 7295ebfb02e1a6ebcc1fc94c4aecfe8e21a0e567 Mon Sep 17 00:00:00 2001
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Wed, 17 Aug 2022 10:21:31 -0400
|
||||
Subject: [PATCH] tests: cli: Fix test output after previous commit
|
||||
|
||||
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
||||
---
|
||||
tests/data/cli/compare/virt-install-many-devices.xml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/data/cli/compare/virt-install-many-devices.xml b/tests/data/cli/compare/virt-install-many-devices.xml
|
||||
index a33dc16a..c27512d1 100644
|
||||
--- a/tests/data/cli/compare/virt-install-many-devices.xml
|
||||
+++ b/tests/data/cli/compare/virt-install-many-devices.xml
|
||||
@@ -424,7 +424,7 @@
|
||||
<target dev="vdu" bus="virtio"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
- <driver name="qemu" type="qcow2">
|
||||
+ <driver name="qemu" type="qcow2" discard="unmap">
|
||||
<metadata_cache>
|
||||
<max_size unit="KiB">2048</max_size>
|
||||
</metadata_cache>
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
From 1b87e3e54c782da39cf30b100a22f70c37bfcddd Mon Sep 17 00:00:00 2001
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Wed, 17 Aug 2022 10:29:31 -0400
|
||||
Subject: [PATCH] tests: testdriver: Add filesystem socket example
|
||||
|
||||
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
||||
---
|
||||
tests/data/testdriver/testdriver.xml | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/tests/data/testdriver/testdriver.xml b/tests/data/testdriver/testdriver.xml
|
||||
index b213863d..7c94e698 100644
|
||||
--- a/tests/data/testdriver/testdriver.xml
|
||||
+++ b/tests/data/testdriver/testdriver.xml
|
||||
@@ -599,6 +599,13 @@ Foo bar baz & yeah boii < > yeahfoo
|
||||
<source file='/root/container.vmdk'/>
|
||||
<target dir='/home'/>
|
||||
</filesystem>
|
||||
+ <filesystem type='mount'>
|
||||
+ <driver type='virtiofs' queue='1024'/>
|
||||
+ <source socket='/tmp/sock'/>
|
||||
+ <target dir='tag'/>
|
||||
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
|
||||
+ </filesystem>
|
||||
+
|
||||
|
||||
<!-- tpm devices -->
|
||||
<tpm model='tpm-tis'>
|
||||
--
|
||||
2.37.2.windows.2
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
Name: virt-manager
|
||||
Version: 4.1.0
|
||||
Release: 6
|
||||
Release: 7
|
||||
Summary: The manage virtual machines tool which via libvirt.
|
||||
License: GPLv2+
|
||||
BuildArch: noarch
|
||||
@ -14,6 +14,11 @@ Patch2: Add-loongarch-support-in-guest-class.patch
|
||||
Patch3: Add-some-default-device-support-for-loongarch.patch
|
||||
Patch4: Add-test-cases-for-loongarch.patch
|
||||
Patch5: Update-chinese-translation-file.patch
|
||||
Patch6: backport-cli-disk-Add-driver.metadata_cache-options.patch
|
||||
Patch7: backport-tests-cli-Fix-test-output-after-previous-commit.patch
|
||||
Patch8: backport-fsdetails-Fix-an-error-with-source.socket-of-virtiof.patch
|
||||
Patch9: backport-cli-Drop-unnecessary-disk-prop-aliases.patch
|
||||
Patch10: backport-tests-testdriver-Add-filesystem-socket-example.patch
|
||||
|
||||
Requires: virt-manager-common = %{version}-%{release} python3-gobject gtk3 libvirt-glib >= 0.0.9
|
||||
Requires: gtk-vnc2 dconf vte291 gtksourceview4
|
||||
@ -91,6 +96,13 @@ done
|
||||
%{_mandir}/man1/{virt-install.1*,virt-clone.1*,virt-xml.1*}
|
||||
|
||||
%changelog
|
||||
* Fri Jul 26 2024 yanjianqing <yanjianqing@kylinos.cn> - 4.1.0-7
|
||||
- tests: testdriver: Add filesystem socket example
|
||||
- cli: Drop unnecessary --disk prop aliases
|
||||
- fsdetails: Fix an error with source.socket of virtiofs
|
||||
- tests: cli: Fix test output after previous commit
|
||||
- cli: --disk: Add driver.metadata_cache options
|
||||
|
||||
* Wed Jul 17 2024 yanjianqing <yanjianqing@kylinos.cn> - 4.1.0-6
|
||||
- Update chinese translation file
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user