- Upstream bug fixes (bsc#1027942)
e7222b50-addstorage-Dont-pass-None-to-widget.set_active.patch 4d0e3232-virtinst-Fix-TOCTOU-in-domain-enumeration.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=531
This commit is contained in:
committed by
Git OBS Bridge
parent
b5bcf7ffeb
commit
71a1522eb7
36
4d0e3232-virtinst-Fix-TOCTOU-in-domain-enumeration.patch
Normal file
36
4d0e3232-virtinst-Fix-TOCTOU-in-domain-enumeration.patch
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
Subject: virtinst: Fix TOCTOU in domain enumeration
|
||||||
|
From: Martin Pitt martin@piware.de Tue Nov 24 14:24:06 2020 +0100
|
||||||
|
Date: Tue Dec 1 13:56:30 2020 -0500:
|
||||||
|
Git: 4d0e323227f18e58283c45be4d240b506faacb22
|
||||||
|
|
||||||
|
Similar to commit 49a01b5482, _fetch_all_domains_raw() has a race
|
||||||
|
condition where a domain may disappear (from parallel libvirt
|
||||||
|
operations) in between enumerating and inspecting the objects.
|
||||||
|
|
||||||
|
Ignore these missing domains instead of crashing.
|
||||||
|
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1901081
|
||||||
|
|
||||||
|
diff --git a/virtinst/connection.py b/virtinst/connection.py
|
||||||
|
index fec273b7..06bc60ad 100644
|
||||||
|
--- a/virtinst/connection.py
|
||||||
|
+++ b/virtinst/connection.py
|
||||||
|
@@ -182,8 +182,16 @@ class VirtinstConnection(object):
|
||||||
|
def _fetch_all_domains_raw(self):
|
||||||
|
dummy1, dummy2, ret = pollhelpers.fetch_vms(
|
||||||
|
self, {}, lambda obj, ignore: obj)
|
||||||
|
- return [Guest(weakref.proxy(self), parsexml=obj.XMLDesc(0))
|
||||||
|
- for obj in ret]
|
||||||
|
+ domains = []
|
||||||
|
+ for obj in ret:
|
||||||
|
+ # TOCTOU race: a domain may go away in between enumeration and inspection
|
||||||
|
+ try:
|
||||||
|
+ xml = obj.XMLDesc(0)
|
||||||
|
+ except libvirt.libvirtError as e: # pragma: no cover
|
||||||
|
+ log.debug("Fetching domain XML failed: %s", e)
|
||||||
|
+ continue
|
||||||
|
+ domains.append(Guest(weakref.proxy(self), parsexml=xml))
|
||||||
|
+ return domains
|
||||||
|
|
||||||
|
def _build_pool_raw(self, poolobj):
|
||||||
|
return StoragePool(weakref.proxy(self),
|
@@ -0,0 +1,23 @@
|
|||||||
|
Subject: addstorage: Don't pass None to widget.set_active()
|
||||||
|
From: Cole Robinson crobinso@redhat.com Sat Nov 21 17:17:33 2020 -0500
|
||||||
|
Date: Sat Nov 21 17:17:33 2020 -0500:
|
||||||
|
Git: e7222b5058c8874b15fbfd998e5eeb233f571075
|
||||||
|
|
||||||
|
Older pygobject can't handle it. Mentioned here:
|
||||||
|
https://github.com/virt-manager/virt-manager/issues/188
|
||||||
|
|
||||||
|
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
||||||
|
|
||||||
|
diff --git a/virtManager/device/addstorage.py b/virtManager/device/addstorage.py
|
||||||
|
index dee0160c..49d0b693 100644
|
||||||
|
--- a/virtManager/device/addstorage.py
|
||||||
|
+++ b/virtManager/device/addstorage.py
|
||||||
|
@@ -310,7 +310,7 @@ class vmmAddStorage(vmmGObjectUI):
|
||||||
|
detect_zeroes = disk.driver_detect_zeroes
|
||||||
|
ro = disk.read_only
|
||||||
|
share = disk.shareable
|
||||||
|
- removable = disk.removable
|
||||||
|
+ removable = bool(disk.removable)
|
||||||
|
serial = disk.serial
|
||||||
|
|
||||||
|
self.set_disk_bus(disk.bus)
|
@@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 9 08:32:32 MST 2020 - carnold@suse.com
|
||||||
|
|
||||||
|
- Upstream bug fixes (bsc#1027942)
|
||||||
|
e7222b50-addstorage-Dont-pass-None-to-widget.set_active.patch
|
||||||
|
4d0e3232-virtinst-Fix-TOCTOU-in-domain-enumeration.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Nov 30 13:39:10 MST 2020 - carnold@suse.com
|
Mon Nov 30 13:39:10 MST 2020 - carnold@suse.com
|
||||||
|
|
||||||
|
@@ -32,6 +32,8 @@ Source1: virt-install.rb
|
|||||||
Source2: virt-install.desktop
|
Source2: virt-install.desktop
|
||||||
Source3: virt-manager-supportconfig
|
Source3: virt-manager-supportconfig
|
||||||
# Upstream Patches
|
# Upstream Patches
|
||||||
|
Patch1: e7222b50-addstorage-Dont-pass-None-to-widget.set_active.patch
|
||||||
|
Patch2: 4d0e3232-virtinst-Fix-TOCTOU-in-domain-enumeration.patch
|
||||||
# SUSE Only
|
# SUSE Only
|
||||||
Patch70: virtman-desktop.patch
|
Patch70: virtman-desktop.patch
|
||||||
Patch71: virtman-kvm.patch
|
Patch71: virtman-kvm.patch
|
||||||
@@ -157,6 +159,8 @@ machine).
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
# Upstream Patches
|
# Upstream Patches
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
# SUSE Only
|
# SUSE Only
|
||||||
%patch70 -p1
|
%patch70 -p1
|
||||||
%patch71 -p1
|
%patch71 -p1
|
||||||
|
Reference in New Issue
Block a user