From nobody Sun Feb 8 19:56:06 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1662639246; cv=none; d=zohomail.com; s=zohoarc; b=nwaIlzRK8KKqJ/0jkdUuLKFSYkD+QGFUkva1uBt+0XALZ+rSaGF5ttVOgwe8nHZ3EATfzVwnFivQvUH0BEEtGa2ZlM4EKcTjmFTxm9BSwHm+oZKprvcJbB0P0985Tl54iaxWt0kEZhCe/g7gQ9Pm0APjLUDeJ1VTVwFgnc9P/zY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662639246; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=M9/7IkAosRpKfCfHuV6WQXcydgY3oVMQTev1WvHgxYY=; b=gz3qsRkfrCJWi+kVDzZ23G+7GSOBiJX5bo9UoiB9937RCFNAVEncBEEXKUfebp8hl/XgLpnjVdZu4WOJEYkwx+djAE9Y3puIkT7bfTLqjXMk8pvFrvlPyWGnUmS7IQlGyGD421mUkZ6DjX8GbmMgdK0rPS7QXVLUoCEj2OP8R6Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1662639246195706.2082575732809; Thu, 8 Sep 2022 05:14:06 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-18-kRXUUXzrPnml2e3t6jnulw-1; Thu, 08 Sep 2022 08:13:21 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A89A68039BB; Thu, 8 Sep 2022 12:13:17 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9654F492C3B; Thu, 8 Sep 2022 12:13:17 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 685FC1946A48; Thu, 8 Sep 2022 12:13:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 828591946A5D for ; Thu, 8 Sep 2022 12:13:16 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 770B82166B26; Thu, 8 Sep 2022 12:13:16 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id AFAE82166B29 for ; Thu, 8 Sep 2022 12:13:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662639245; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=M9/7IkAosRpKfCfHuV6WQXcydgY3oVMQTev1WvHgxYY=; b=OdKyj8wzIj8dUNOqiqoD5OytbGyctoKBE9eMML1UK5PWOrE8DbdnTc8WVfawch3xfFlxcA sqxZlPIpLfo+9p4xaoRdv56jw2Y4UsWIHotj0Z+YFOFSLha665gKIZOWKi1GkEEsQyxEEE k4AxaGe6JVdVSK9YzWr/XuGP8v/YB1U= X-MC-Unique: kRXUUXzrPnml2e3t6jnulw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 5/8] qemu: migration: Don't attempt to fall back to old-style storage migration Date: Thu, 8 Sep 2022 14:13:05 +0200 Message-Id: <4fac92a9687501c6bd4c58471bb0a3b14cb8ef87.1662639119.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1662639247587100001 Content-Type: text/plain; charset="utf-8" QEMU supported the NBD server required for the new-style migration for a long time already and when coupled with -blockdev the old style migration doesn't even work, thus remove support for it. This patch modifies the code to check that the destination returned data for the NBD migration and returns an error if it did not and deletes the fallback code paths which would not work. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration.c | 45 +++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 995364da02..7dc593d49f 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -4817,35 +4817,28 @@ qemuMigrationSrcRun(virQEMUDriver *driver, } if (storageMigration) { - if (mig->nbd) { - const char *host =3D ""; - const char *tlsHostname =3D qemuMigrationParamsGetTLSHostname(= migParams); + const char *host =3D ""; + const char *tlsHostname =3D qemuMigrationParamsGetTLSHostname(migP= arams); - if (spec->destType =3D=3D MIGRATION_DEST_HOST || - spec->destType =3D=3D MIGRATION_DEST_CONNECT_HOST) { - host =3D spec->dest.host.name; - } - - if (qemuMigrationSrcNBDStorageCopy(driver, vm, mig, - host, - priv->migMaxBandwidth, - nmigrate_disks, - migrate_disks, - dconn, tlsAlias, tlsHostnam= e, - nbdURI, flags) < 0) { - goto error; - } - } else { - /* Destination doesn't support NBD server. - * Fall back to previous implementation. */ - VIR_DEBUG("Destination doesn't support NBD server " - "Falling back to previous implementation."); + if (!mig->nbd) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("migration of non-shared disks requested but = NBD is not set up")); + goto error; + } - if (flags & VIR_MIGRATE_NON_SHARED_DISK) - migrate_flags |=3D QEMU_MONITOR_MIGRATE_NON_SHARED_DISK; + if (spec->destType =3D=3D MIGRATION_DEST_HOST || + spec->destType =3D=3D MIGRATION_DEST_CONNECT_HOST) { + host =3D spec->dest.host.name; + } - if (flags & VIR_MIGRATE_NON_SHARED_INC) - migrate_flags |=3D QEMU_MONITOR_MIGRATE_NON_SHARED_INC; + if (qemuMigrationSrcNBDStorageCopy(driver, vm, mig, + host, + priv->migMaxBandwidth, + nmigrate_disks, + migrate_disks, + dconn, tlsAlias, tlsHostname, + nbdURI, flags) < 0) { + goto error; } } --=20 2.37.1