]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Ignore missing query-migrate-parameters
authorJiri Denemark <jdenemar@redhat.com>
Wed, 26 Apr 2017 21:18:35 +0000 (23:18 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 27 Apr 2017 08:33:18 +0000 (10:33 +0200)
Migration with old QEMU which does not support query-migrate-parameters
would fail because the QMP command is called unconditionally since the
introduction of TLS migration. Previously it was only called if the user
explicitly requested a feature which uses QEMU migration parameters. And
even then the situation was not ideal, instead of reporting an
unsupported feature we'd just complain about missing QMP command.

Trivially no migration parameters are supported when
query-migrate-parameters QMP command is missing. There's no need to
report an error if it is missing, the callers will report better error
if needed.

https://bugzilla.redhat.com/show_bug.cgi?id=1441934

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_monitor_json.c

index 98e3c53f59574211696ccd518633dc6c9aa577ae..083729003ba36dcc941347fbdd1a5cf4648d96a2 100644 (file)
@@ -2660,6 +2660,11 @@ qemuMonitorJSONGetMigrationParams(qemuMonitorPtr mon,
     if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
         goto cleanup;
 
+    if (qemuMonitorJSONHasError(reply, "CommandNotFound")) {
+        ret = 0;
+        goto cleanup;
+    }
+
     if (qemuMonitorJSONCheckError(cmd, reply) < 0)
         goto cleanup;