diff --git a/6c1dddaf-libxl-shutdown-inhibit.patch b/6c1dddaf-libxl-shutdown-inhibit.patch new file mode 100644 index 0000000..4566234 --- /dev/null +++ b/6c1dddaf-libxl-shutdown-inhibit.patch @@ -0,0 +1,39 @@ +commit 6c1dddaf97b4ef70e27961c9f79b15c79a863ac5 +Author: Marek Marczykowski-Górecki +Date: Sat Jan 18 03:37:42 2020 +0100 + + libxl: initialize shutdown inhibit callback + + The libxl driver already tries to call shutdown inhibit callback in the + right places, but only if it's set. That last part was missing, + resulting in premature shutdown when running libvirtd + --timeout=... + + Signed-off-by: Marek Marczykowski-Górecki + Reviewed-by: Jim Fehlig + +diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c +index ef02a066d9..eb166244ba 100644 +--- a/src/libxl/libxl_driver.c ++++ b/src/libxl/libxl_driver.c +@@ -648,8 +648,8 @@ libxlAddDom0(libxlDriverPrivatePtr driver) + + static int + libxlStateInitialize(bool privileged, +- virStateInhibitCallback callback G_GNUC_UNUSED, +- void *opaque G_GNUC_UNUSED) ++ virStateInhibitCallback callback, ++ void *opaque) + { + libxlDriverConfigPtr cfg; + char *driverConf = NULL; +@@ -670,6 +670,9 @@ libxlStateInitialize(bool privileged, + return VIR_DRV_STATE_INIT_ERROR; + } + ++ libxl_driver->inhibitCallback = callback; ++ libxl_driver->inhibitOpaque = opaque; ++ + /* Allocate bitmap for vnc port reservation */ + if (!(libxl_driver->reservedGraphicsPorts = + virPortAllocatorRangeNew(_("VNC"), diff --git a/libvirt.changes b/libvirt.changes index 98c23db..4c1d547 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jan 29 20:56:13 UTC 2020 - James Fehlig + +- xen: Inhibit libvirtd shutdown when domains are running + 6c1dddaf-libxl-shutdown-inhibit.patch + bsc#1157100 + ------------------------------------------------------------------- Wed Jan 15 19:27:10 UTC 2020 - James Fehlig diff --git a/libvirt.spec b/libvirt.spec index 038d7a6..b34bfc0 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -1,7 +1,7 @@ # # spec file for package libvirt # -# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -338,6 +338,7 @@ Source6: libvirtd-relocation-server.xml Source99: baselibs.conf Source100: %{name}-rpmlintrc # Upstream patches +Patch0: 6c1dddaf-libxl-shutdown-inhibit.patch # Patches pending upstream review Patch100: libxl-dom-reset.patch Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch @@ -871,6 +872,7 @@ libvirt plugin for NSS for translating domain names into IP addresses. %prep %setup -q +%patch0 -p1 %patch100 -p1 %patch101 -p1 %patch150 -p1