[libvirt] [PATCH v2 2/9] qemu: process: Don't try to redetect missing qemuCaps on reconnect

Ján Tomko jtomko at redhat.com
Mon Dec 2 15:45:01 UTC 2019


On Mon, Dec 02, 2019 at 04:35:36PM +0100, Peter Krempa wrote:
>The redetection was originally added in 43c01d3838 as a way to recover
>from libvirtd upgrade from the time when we didn't persist the qemu
>capabilities in the status XML. Also this the oldest supported qemu by
>more than two years.
>
>Even if somebody would have a running VM running at least qemu 1.5 with
>such an old libvirt we certainly wouldn't do the right thing by
>redetecting the capabilities and then trying to communicate with qemu.
>
>For now it will be the best to just stop considering this scenario any
>more and error out for such VM.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
>- report an error rather than doing nothing
>
> src/qemu/qemu_process.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
>diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
>index 3083d0b538..1c8ad1c279 100644
>--- a/src/qemu/qemu_process.c
>+++ b/src/qemu/qemu_process.c
>@@ -8085,12 +8085,12 @@ qemuProcessReconnect(void *opaque)
>         goto error;
>     }
>
>-    /* If upgrading from old libvirtd we won't have found any
>-     * caps in the domain status, so re-query them
>-     */
>-    if (!priv->qemuCaps &&
>-        (qemuDomainUpdateQEMUCaps(obj, driver->qemuCapsCache) < 0))
>+    if (!priv->qemuCaps) {
>+        virReportError(VIR_ERR_INTERNAL_ERROR,
>+                       _("domain '%s' has no capabilities recorded"),
>+                       obj->def->name);
>         goto error;
>+    }

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20191202/de9e9b39/attachment-0001.sig>


More information about the libvir-list mailing list