]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Disable NBD TLS migration over UNIX socket
authorMartin Kletzander <mkletzan@redhat.com>
Wed, 18 Nov 2020 12:51:05 +0000 (13:51 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Tue, 24 Nov 2020 23:10:52 +0000 (00:10 +0100)
Even though it is technically possible, when running the migrations QEMU's
nbd-server-start errors out with:

  "TLS is only supported with IPv4/IPv6"

We can always enable it when QEMU adds this feature, but for now it is safer to
show our error message rather than rely on QEMU to error out properly.

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

index 122481dea1f1cd871ecf9bbce3d442ce1b49fb2f..4be8f3c64c94895e357d8ecc3cfcf52b6b26bebf 100644 (file)
@@ -1100,6 +1100,12 @@ qemuMigrationSrcNBDStorageCopy(virQEMUDriverPtr driver,
             if (uri->port)
                 port = uri->port;
         } else if (STREQ(uri->scheme, "unix")) {
+            if (flags & VIR_MIGRATE_TLS) {
+                virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+                               _("NBD migration with TLS is not supported over UNIX socket"));
+                return -1;
+            }
+
             if (!uri->path) {
                 virReportError(VIR_ERR_INVALID_ARG, "%s",
                                _("UNIX disks URI does not include path"));