]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: Forbid unsupported parameters for tunnelled migration
authorJiri Denemark <jdenemar@redhat.com>
Thu, 30 Apr 2015 13:56:07 +0000 (15:56 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Mon, 4 May 2015 13:06:33 +0000 (15:06 +0200)
Neither migrate URI nor lister address make any sense for tunnelled
migration.

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

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

index eb70f29786b43ede07cf8c41663183f6e7e67e45..20c21938caa14bf34fbc7cddb94b2f3b9f333b28 100644 (file)
@@ -4814,6 +4814,20 @@ static int doPeer2PeerMigrate(virQEMUDriverPtr driver,
               NULLSTR(uri), NULLSTR(graphicsuri), NULLSTR(listenAddress),
               flags, NULLSTR(dname), resource);
 
+    if (flags & VIR_MIGRATE_TUNNELLED && uri) {
+        virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
+                       _("migration URI is not supported by tunnelled "
+                         "migration"));
+        goto cleanup;
+    }
+
+    if (flags & VIR_MIGRATE_TUNNELLED && listenAddress) {
+        virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
+                       _("listen address is not supported by tunnelled "
+                         "migration"));
+        goto cleanup;
+    }
+
     /* the order of operations is important here; we make sure the
      * destination side is completely setup before we touch the source
      */
@@ -4857,7 +4871,7 @@ static int doPeer2PeerMigrate(virQEMUDriverPtr driver,
 
     /* Only xmlin, dname, uri, and bandwidth parameters can be used with
      * old-style APIs. */
-    if (!useParams && graphicsuri) {
+    if (!useParams && (graphicsuri || listenAddress)) {
         virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
                        _("Migration APIs with extensible parameters are not "
                          "supported but extended parameters were passed"));