Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libvirt for openSUSE:Factory checked in at 2022-02-10 23:11:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libvirt (Old) and /work/SRC/openSUSE:Factory/.libvirt.new.1956 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libvirt" Thu Feb 10 23:11:35 2022 rev:348 rq:952832 version:8.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/libvirt/libvirt.changes 2022-01-27 23:17:03.778938338 +0100 +++ /work/SRC/openSUSE:Factory/.libvirt.new.1956/libvirt.changes 2022-02-10 23:11:56.640188237 +0100 @@ -1,0 +2,16 @@ +Tue Feb 8 22:25:03 UTC 2022 - James Fehlig <[email protected]> + +- qemu: fix inactive snapshot revert + 76deb656-qemu-fix-snapshot-revert.patch + boo#1195690 + +------------------------------------------------------------------- +Mon Feb 7 21:32:20 UTC 2022 - James Fehlig <[email protected]> + +- libxl: Mark auto-allocated graphics ports to used on reconnect + e0241f33-libxl-mark-allocated-graphics-ports.patch +- libxl: Release all auto-allocated graphics ports + 18ec405a-libxl-release-graphics-ports.patch + bsc#1191668 + +------------------------------------------------------------------- New: ---- 18ec405a-libxl-release-graphics-ports.patch 76deb656-qemu-fix-snapshot-revert.patch e0241f33-libxl-mark-allocated-graphics-ports.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libvirt.spec ++++++ --- /var/tmp/diff_new_pack.xg9Grv/_old 2022-02-10 23:11:57.872191358 +0100 +++ /var/tmp/diff_new_pack.xg9Grv/_new 2022-02-10 23:11:57.876191368 +0100 @@ -306,6 +306,9 @@ Patch2: 8eb44616-remove-sysconfig-files.patch Patch3: 31e937fb-libxl-save-lock-indicator.patch Patch4: 105dace2-revert-virProcessGetStatInfo.patch +Patch5: e0241f33-libxl-mark-allocated-graphics-ports.patch +Patch6: 18ec405a-libxl-release-graphics-ports.patch +Patch7: 76deb656-qemu-fix-snapshot-revert.patch # Patches pending upstream review Patch100: libxl-dom-reset.patch Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch ++++++ 0001-libxl-add-support-for-BlockResize-API.patch ++++++ --- /var/tmp/diff_new_pack.xg9Grv/_old 2022-02-10 23:11:57.936191520 +0100 +++ /var/tmp/diff_new_pack.xg9Grv/_new 2022-02-10 23:11:57.940191530 +0100 @@ -23,7 +23,7 @@ =================================================================== --- libvirt-8.0.0.orig/src/libxl/libxl_driver.c +++ libvirt-8.0.0/src/libxl/libxl_driver.c -@@ -5241,6 +5241,95 @@ libxlDomainMemoryStats(virDomainPtr dom, +@@ -5264,6 +5264,95 @@ libxlDomainMemoryStats(virDomainPtr dom, #undef LIBXL_SET_MEMSTAT @@ -119,7 +119,7 @@ static int libxlDomainGetJobInfo(virDomainPtr dom, virDomainJobInfoPtr info) -@@ -6554,6 +6643,7 @@ static virHypervisorDriver libxlHypervis +@@ -6577,6 +6666,7 @@ static virHypervisorDriver libxlHypervis .domainGetNumaParameters = libxlDomainGetNumaParameters, /* 1.1.1 */ .nodeGetFreeMemory = libxlNodeGetFreeMemory, /* 0.9.0 */ .nodeGetCellsFreeMemory = libxlNodeGetCellsFreeMemory, /* 1.1.1 */ ++++++ 18ec405a-libxl-release-graphics-ports.patch ++++++ commit 18ec405a36e24c86abe1104699c0bffdc91d5169 Author: Jim Fehlig <[email protected]> Date: Mon Feb 7 13:57:07 2022 -0700 libxl: Release auto-allocated spice ports While VNC ports auto-allocated by the libxl driver are released in libxlDomainCleanup, spice ports are overlooked. Rework the existing logic to release any auto-allocated graphics ports, not just the VNC port of the first graphics device. Signed-off-by: Jim Fehlig <[email protected]> Reviewed-by: J??n Tomko <[email protected]> Index: libvirt-8.0.0/src/libxl/libxl_domain.c =================================================================== --- libvirt-8.0.0.orig/src/libxl/libxl_domain.c +++ libvirt-8.0.0/src/libxl/libxl_domain.c @@ -906,10 +906,10 @@ libxlDomainCleanup(libxlDriverPrivate *d { libxlDomainObjPrivate *priv = vm->privateData; g_autoptr(libxlDriverConfig) cfg = libxlDriverConfigGet(driver); - int vnc_port; char *file; virHostdevManager *hostdev_mgr = driver->hostdevMgr; unsigned int hostdev_flags = VIR_HOSTDEV_SP_PCI; + size_t i; VIR_DEBUG("Cleaning up domain with id '%d' and name '%s'", vm->def->id, vm->def->name); @@ -944,13 +944,31 @@ libxlDomainCleanup(libxlDriverPrivate *d if (!!g_atomic_int_dec_and_test(&driver->nactive) && driver->inhibitCallback) driver->inhibitCallback(false, driver->inhibitOpaque); - if ((vm->def->ngraphics == 1) && - vm->def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC && - vm->def->graphics[0]->data.vnc.autoport) { - vnc_port = vm->def->graphics[0]->data.vnc.port; - if (vnc_port >= LIBXL_VNC_PORT_MIN) { - if (virPortAllocatorRelease(vnc_port) < 0) - VIR_DEBUG("Could not mark port %d as unused", vnc_port); + /* Release auto-allocated graphics ports */ + for (i = 0; i < vm->def->ngraphics; i++) { + virDomainGraphicsDef *graphics = vm->def->graphics[i]; + int gport = -1; + + switch (graphics->type) { + case VIR_DOMAIN_GRAPHICS_TYPE_VNC: + if (graphics->data.vnc.autoport && + graphics->data.vnc.port >= LIBXL_VNC_PORT_MIN) + gport = graphics->data.vnc.port; + break; + case VIR_DOMAIN_GRAPHICS_TYPE_SPICE: + if (graphics->data.spice.autoport) + gport = graphics->data.spice.port; + break; + case VIR_DOMAIN_GRAPHICS_TYPE_SDL: + case VIR_DOMAIN_GRAPHICS_TYPE_RDP: + case VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP: + case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: + case VIR_DOMAIN_GRAPHICS_TYPE_LAST: + break; + } + if (gport != -1) { + if (virPortAllocatorRelease(gport) < 0) + VIR_DEBUG("Could not mark port %d as unused", gport); } } ++++++ 76deb656-qemu-fix-snapshot-revert.patch ++++++ commit 76deb656132bb8817ddae4b7f417930c4db824c9 Author: J??n Tomko <[email protected]> Date: Thu Jan 20 14:53:33 2022 +0100 qemu: fix inactive snapshot revert The commit splitting out the qemuSnapshotRevertInactive function dropped the 'defined = true' line by accident and instead returned -1, leaving the user with a cryptic error: error: An error occurred, but the cause is unknown https://bugzilla.redhat.com/show_bug.cgi?id=2039136 https://gitlab.com/libvirt/libvirt/-/issues/266 Fixes: 85e4a13c3f19078fb6af5ffb4a80022c142cbc7e Signed-off-by: J??n Tomko <[email protected]> Index: libvirt-8.0.0/src/qemu/qemu_snapshot.c =================================================================== --- libvirt-8.0.0.orig/src/qemu/qemu_snapshot.c +++ libvirt-8.0.0/src/qemu/qemu_snapshot.c @@ -2193,7 +2193,7 @@ qemuSnapshotRevertInactive(virDomainObj if (*inactiveConfig) { virDomainObjAssignDef(vm, inactiveConfig, false, NULL); - return -1; + defined = true; } if (flags & (VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING | ++++++ e0241f33-libxl-mark-allocated-graphics-ports.patch ++++++ commit e0241f334d4e8da2e36cda48c225d5a6edcc3a50 Author: Jim Fehlig <[email protected]> Date: Tue Feb 1 17:03:11 2022 -0700 libxl: Set auto-allocated graphics ports to used on reconnect The libxl driver reconnects to all running VMs when libvirtd is restarted, but it failed to mark auto-allocated graphics ports as set in the port allocator. If many VMs are running that use port auto-allocation and libvirtd is restarted, the port allocator is likely to hand out a port already in use when a new VM is created that uses auto-allocation. VM creation will fail due to the port clash. When reconnecting to running VMs after a libvirtd restart, let the port allocator know about previously allocated ports. Signed-off-by: Jim Fehlig <[email protected]> Reviewed-by: J??n Tomko <[email protected]> Index: libvirt-8.0.0/src/libxl/libxl_driver.c =================================================================== --- libvirt-8.0.0.orig/src/libxl/libxl_driver.c +++ libvirt-8.0.0/src/libxl/libxl_driver.c @@ -393,6 +393,7 @@ libxlReconnectDomain(virDomainObj *vm, virHostdevManager *hostdev_mgr = driver->hostdevMgr; unsigned int hostdev_flags = VIR_HOSTDEV_SP_PCI; int ret = -1; + size_t i; hostdev_flags |= VIR_HOSTDEV_SP_USB; @@ -447,6 +448,28 @@ libxlReconnectDomain(virDomainObj *vm, libxlReconnectNotifyNets(vm->def); + /* Set any auto-allocated graphics ports to used */ + for (i = 0; i < vm->def->ngraphics; i++) { + virDomainGraphicsDef *graphics = vm->def->graphics[i]; + + switch (graphics->type) { + case VIR_DOMAIN_GRAPHICS_TYPE_VNC: + if (graphics->data.vnc.autoport) + virPortAllocatorSetUsed(graphics->data.vnc.port); + break; + case VIR_DOMAIN_GRAPHICS_TYPE_SPICE: + if (graphics->data.spice.autoport) + virPortAllocatorSetUsed(graphics->data.spice.port); + break; + case VIR_DOMAIN_GRAPHICS_TYPE_SDL: + case VIR_DOMAIN_GRAPHICS_TYPE_RDP: + case VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP: + case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: + case VIR_DOMAIN_GRAPHICS_TYPE_LAST: + break; + } + } + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) VIR_WARN("Cannot update XML for running Xen guest %s", vm->def->name); ++++++ libxl-dom-reset.patch ++++++ --- /var/tmp/diff_new_pack.xg9Grv/_old 2022-02-10 23:11:58.116191976 +0100 +++ /var/tmp/diff_new_pack.xg9Grv/_new 2022-02-10 23:11:58.120191986 +0100 @@ -12,7 +12,7 @@ =================================================================== --- libvirt-8.0.0.orig/src/libxl/libxl_driver.c +++ libvirt-8.0.0/src/libxl/libxl_driver.c -@@ -1338,6 +1338,63 @@ libxlDomainReboot(virDomainPtr dom, unsi +@@ -1361,6 +1361,63 @@ libxlDomainReboot(virDomainPtr dom, unsi } static int @@ -76,7 +76,7 @@ libxlDomainDestroyFlags(virDomainPtr dom, unsigned int flags) { -@@ -6432,6 +6489,7 @@ static virHypervisorDriver libxlHypervis +@@ -6455,6 +6512,7 @@ static virHypervisorDriver libxlHypervis .domainShutdown = libxlDomainShutdown, /* 0.9.0 */ .domainShutdownFlags = libxlDomainShutdownFlags, /* 0.9.10 */ .domainReboot = libxlDomainReboot, /* 0.9.0 */ ++++++ libxl-set-migration-constraints.patch ++++++ --- /var/tmp/diff_new_pack.xg9Grv/_old 2022-02-10 23:11:58.136192026 +0100 +++ /var/tmp/diff_new_pack.xg9Grv/_new 2022-02-10 23:11:58.140192036 +0100 @@ -75,7 +75,7 @@ =================================================================== --- libvirt-8.0.0.orig/src/libxl/libxl_driver.c +++ libvirt-8.0.0/src/libxl/libxl_driver.c -@@ -5973,6 +5973,9 @@ libxlDomainMigratePerform3Params(virDoma +@@ -5996,6 +5996,9 @@ libxlDomainMigratePerform3Params(virDoma const char *dname = NULL; const char *uri = NULL; int ret = -1; @@ -85,7 +85,7 @@ #ifdef LIBXL_HAVE_NO_SUSPEND_RESUME virReportUnsupportedError(); -@@ -5989,6 +5992,15 @@ libxlDomainMigratePerform3Params(virDoma +@@ -6012,6 +6015,15 @@ libxlDomainMigratePerform3Params(virDoma virTypedParamsGetString(params, nparams, VIR_MIGRATE_PARAM_DEST_NAME, &dname) < 0 || @@ -101,7 +101,7 @@ virTypedParamsGetString(params, nparams, VIR_MIGRATE_PARAM_URI, &uri) < 0) -@@ -6003,11 +6015,11 @@ libxlDomainMigratePerform3Params(virDoma +@@ -6026,11 +6038,11 @@ libxlDomainMigratePerform3Params(virDoma if ((flags & (VIR_MIGRATE_TUNNELLED | VIR_MIGRATE_PEER2PEER))) { if (libxlDomainMigrationSrcPerformP2P(driver, vm, dom->conn, dom_xml,
