- bsc#1138110 - XEN guest can not be restored from virt-manager

after it is saved
  virtman-fix-restore-vm-menu-selection.patch
- Upstream bug fix (bsc#1027942)
  578451fe-urldetect-Dont-run-regex-against-None-SUSE-product-name.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=472
This commit is contained in:
Charles Arnold 2019-06-13 21:39:40 +00:00 committed by Git OBS Bridge
parent 893c15f64f
commit b615c7c62b
4 changed files with 55 additions and 1 deletions

View File

@ -0,0 +1,24 @@
Subject: urldetect: Don't run regex against None SUSE product name
From: Cole Robinson crobinso@redhat.com Mon Jun 10 08:42:39 2019 -0400
Date: Mon Jun 10 08:44:20 2019 -0400:
Git: 578451fe721f8df0cf81c7d510a51af8fbe8179d
We are implicitly depending on random dict ordering for what
order we process Distro matching. Our test suite mocking and
different debian ordering revealed a case we could be trying to
run a regex against None. Fix it. The dict ordering issue will
be fixed separately
Index: virt-manager-2.1.0/virtinst/urldetect.py
===================================================================
--- virt-manager-2.1.0.orig/virtinst/urldetect.py
+++ virt-manager-2.1.0/virtinst/urldetect.py
@@ -499,7 +499,7 @@ class _SuseDistro(_RHELDistro):
if not cache.suse_content:
return False
for regex in cls._suse_regex:
- if re.match(regex, cache.suse_content.product_name):
+ if re.match(regex, cache.suse_content.product_name or ""):
return True
return False

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Thu Jun 13 14:15:44 MDT 2019 - carnold@suse.com
- bsc#1138110 - XEN guest can not be restored from virt-manager
after it is saved
virtman-fix-restore-vm-menu-selection.patch
- Upstream bug fix (bsc#1027942)
578451fe-urldetect-Dont-run-regex-against-None-SUSE-product-name.patch
-------------------------------------------------------------------
Mon Jun 3 16:03:39 MDT 2019 - carnold@suse.com

View File

@ -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 https://bugs.opensuse.org/
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
@ -62,6 +62,7 @@ Patch26: f23b01be-guest-Add-VirtIO-input-devices-to-s390x-guests-with-gra
Patch27: 7afbb90b-virt-xml-Handle-VM-names-that-look-like-id-uuid.patch
Patch28: 8d9743d6-virt-install-Add-support-for-xenbus-controller.patch
Patch29: a0ca387a-cli-Fix-pool-default-when-path-belongs-to-another-pool.patch
Patch30: 578451fe-urldetect-Dont-run-regex-against-None-SUSE-product-name.patch
# SUSE Only
Patch70: virtman-desktop.patch
Patch71: virtman-kvm.patch
@ -101,6 +102,7 @@ Patch164: virtinst-use-qemu-for-cdrom-device.patch
Patch165: virtinst-keep-install-iso-attached.patch
Patch166: virtinst-osdict-get_supported.patch
Patch167: virtinst-dont-use-special-copy-cpu-features.patch
Patch168: virtman-fix-restore-vm-menu-selection.patch
# Python2 to Python3 patches
Patch200: virtconv-python2-to-python3-conversion.patch
Patch201: virtinst-python2-to-python3-conversion.patch
@ -217,6 +219,7 @@ machine).
%patch27 -p1
%patch28 -p1
%patch29 -p1
%patch30 -p1
# SUSE Only
%patch70 -p1
%patch71 -p1
@ -256,6 +259,7 @@ machine).
%patch165 -p1
%patch166 -p1
%patch167 -p1
%patch168 -p1
# Python2 to Python3 patches
%patch200 -p1
%patch201 -p1

View File

@ -0,0 +1,17 @@
References: bsc#1138110
virt-manager no longer tracks the saved state but leaves it up to libvirt.
Libvirt returns libvirt.VIR_DOMAIN_PMSUSPENDED after a vm has been 'saved'.
--- virt-manager-2.1.0/virtManager/domain.py.orig 2019-06-13 13:53:44.915571869 -0600
+++ virt-manager-2.1.0/virtManager/domain.py 2019-06-13 14:11:40.413147729 -0600
@@ -1599,7 +1599,8 @@ class vmmDomain(vmmLibvirtObject):
return (self.is_stoppable() or
self.status() in [libvirt.VIR_DOMAIN_CRASHED])
def is_runable(self):
- return self.is_shutoff()
+ return self.status() in [libvirt.VIR_DOMAIN_SHUTOFF,
+ libvirt.VIR_DOMAIN_PMSUSPENDED]
def is_pauseable(self):
return self.status() in [libvirt.VIR_DOMAIN_RUNNING]
def is_unpauseable(self):