From nobody Sat May 18 00:38:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1662639201; cv=none; d=zohomail.com; s=zohoarc; b=I9Hcjsi2Y5MoZ4WKz8m0EOt8oMxDTEztnKygz+auTC00gblua54q5vCvEBOBE3sJaArSiM+U+oKmIy6//zRCrOsARRTsMEHaYCOKdew+pg0HDkluvLjH2obxe8DpvWTF6C5T4TFnptK8BQ0Tv+Uu93bW6HoogwVAT5vP2uTiTb4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662639201; 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=5caVgRVTCMho9av/tJpPs6CL7Wo3CSESj53bJRU+Apo=; b=PUCYcTM7rsMHUT5pJWAbvvnG3yT3oxGKQt4D4+XNs1/n1FA0D4ICS5HkSSAc6P/oonisI+rtLU6QEim7KZIVllLTfD6iGyPxJSFYSpwFdt4lmNm+sFxLFyjabkm5A/G4EWCb68fD58KNB29rpq99Q+/n5lIew5xITSAg0dLlNaQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 16626392015931004.7873127636491; Thu, 8 Sep 2022 05:13:21 -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-44-5l-GM1vhNDuwEQHJ5xUH4g-1; Thu, 08 Sep 2022 08:13:17 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 67F4885A58C; Thu, 8 Sep 2022 12:13:14 +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 2982340E7F28; Thu, 8 Sep 2022 12:13:14 +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 284B21946A5F; Thu, 8 Sep 2022 12:13:13 +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 33F7C1946A44 for ; Thu, 8 Sep 2022 12:13:12 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 18A7E2166B29; Thu, 8 Sep 2022 12:13:12 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 89E5D2166B26 for ; Thu, 8 Sep 2022 12:13:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662639200; 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=5caVgRVTCMho9av/tJpPs6CL7Wo3CSESj53bJRU+Apo=; b=Y1P83E6vJGNV8Qpzr/BfEzUxBTvfxCj/+mX0mqyGAULDKYrDWXQa9rgcS+D1ppH1ng4LGZ 5xPGzZOlhN9CDNFIOjMaUv0NvsXo0i8Pxn6gnMv63bsBldw0OkN9Af2PjbOzg2va8U7dZv 62WENVsorBmuuUbG4npKXaQb+oXFRs8= X-MC-Unique: 5l-GM1vhNDuwEQHJ5xUH4g-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/8] qemu: migration: Fix setup of non-shared storage migration in qemuMigrationSrcBeginPhase Date: Thu, 8 Sep 2022 14:13:01 +0200 Message-Id: <5e5b8a4d0427b9440beb70850c2748dec83b5ede.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.84 on 10.11.54.1 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: 1662639203216100003 Content-Type: text/plain; charset="utf-8" In commit 6111b2352242e9 removing pre-blockdev code paths I've improperly refactored the setup of non-shared storage migration. Specifically the code checking that there are disks and setting up the NBD data in the migration cookie was originally outside of the loop checking the user provided list of specific disks to migrate, but became part of the block as it was not un-indented when a higher level block was being removed. The above caused that if non-shared storage migration is requested, but the user doesn't provide the list of disks to migrate (thus implying to migrate every appropriate disk) the code doesn't actually setup the migration and then later on falls back to the old-style migration which no longer works with blockdev. Move the check that there's anything to migrate out of the 'nmigrate_disks' block. Fixes: 6111b2352242e93c6d2c29f9549d596ed1056ce5 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D2125111 Resolves: https://gitlab.com/libvirt/libvirt/-/issues/373 Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_migration.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 76a65bf298..5367b74de4 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2609,14 +2609,14 @@ qemuMigrationSrcBeginPhase(virQEMUDriver *driver, return NULL; } } + } - priv->nbdPort =3D 0; + priv->nbdPort =3D 0; - if (qemuMigrationHasAnyStorageMigrationDisks(vm->def, - migrate_disks, - nmigrate_disks)) - cookieFlags |=3D QEMU_MIGRATION_COOKIE_NBD; - } + if (qemuMigrationHasAnyStorageMigrationDisks(vm->def, + migrate_disks, + nmigrate_disks)) + cookieFlags |=3D QEMU_MIGRATION_COOKIE_NBD; } if (virDomainDefHasMemoryHotplug(vm->def) || --=20 2.37.1 From nobody Sat May 18 00:38:12 2024 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=1662639204; cv=none; d=zohomail.com; s=zohoarc; b=Z391CYB0yDRoyu1vHFXE46RTR0+xiUtDnfP52AouWJiXp9zMPNI3/uN1IdwtSvBdCfjMbQ2QSuXQn62rcSL3FFzNqhGSYAYBmpIRgR2zS91CDa/0v6nDpY8pVNUq9mqex9mi9Sd6DZGQtGh9Z0fMIEN1gHN3VnvgOEO9uVleDFQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662639204; 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=twrYPzhoFKuqMMLKmyQfQuz+eY27T8o0scvkpYED7rI=; b=Bsa9BZhyIwHzmmauWwXniivCL6fCKaVq7Nz09MWj1JAYdIU0Mh/Jlb4tuqCCRJxq/TKVg/Xl5gzBGTgzvpDAMQTFZpj+IMfX++DJkk6WE4kq36K9fDeuH90KTFWcOd5XD3isX1pGFkTK7+zayR0UOxuBgTt8Exj6OjxndzDlKyE= 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 1662639204648919.0699222709205; Thu, 8 Sep 2022 05:13:24 -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-507-3a5RVpXINw-EtxHgvai9tg-1; Thu, 08 Sep 2022 08:13:20 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 639BD85A585; Thu, 8 Sep 2022 12:13:16 +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 506D22166B2A; Thu, 8 Sep 2022 12:13:16 +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 33A981946A48; Thu, 8 Sep 2022 12:13:16 +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 46FBB1946A67 for ; Thu, 8 Sep 2022 12:13:13 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 378EC2166B29; Thu, 8 Sep 2022 12:13:13 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id A954E2166B26 for ; Thu, 8 Sep 2022 12:13:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662639203; 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=twrYPzhoFKuqMMLKmyQfQuz+eY27T8o0scvkpYED7rI=; b=JMIvkrmoVQV8ZY4pkzvkCbs2ge6pbbzmhHDhweZiNqKEhSHxDElGly3q786fH6vyoOK2iP ZdHAQdFFCR0x16dMJBR5zghiC5SwLxiCfaTWoqjdv/teP4wH1+C7rUA0JO8Afah0u5WoXg F7ZF2N7EdQoV7e7atyZLh2hJBeCHz48= X-MC-Unique: 3a5RVpXINw-EtxHgvai9tg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/8] NEWS: Mention that non-shared storage migration was broken in libvirt-8.7 Date: Thu, 8 Sep 2022 14:13:02 +0200 Message-Id: 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.78 on 10.11.54.6 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: 1662639205251100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- NEWS.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 73d3c0054a..69c5b70c2f 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -27,6 +27,12 @@ v8.8.0 (unreleased) * **Bug fixes** + * qemu: Fix non-shared storage migration setup + + This release fixes a bug in setup of a migration with non-shared stora= ge + ( ``virsh migrate --copy-storage-all``) which was broken by a refactor= of + the code in libvirt-8.7. + v8.7.0 (2022-09-01) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 2.37.1 From nobody Sat May 18 00:38:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1662639200; cv=none; d=zohomail.com; s=zohoarc; b=RZgHLHF+Bbah56DeHJOxkDVvYNJh+FpmE/z2nXBM0c1vCDb75PCh5La9raWAWAhJgV3aHll+miAglwmIhHzFcLHef8Kphzz5m4BBMUSLx0zv+6OZHaSKJY3RsMp9sKN1X0qH/UGhIty+OaBcWsFRcrSs60eITD75DncLDtP1beI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662639200; 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=qr8b8drxzTz9NnxsWk2VUW0dA3qgNTdPEtbELKn21k4=; b=bBNkf1R2oN6Ji043ITBRvbPTCV4llsSpK2vPX6qOwQOdfya40b1VIN1uvJmC8+o8WnD6SXANyENnvibYjVjniIbc5rgcO9V3Xj07z0YbNX4uzNns2v5fRVSO761SB3rlwdfRk0T+G0Jk5e1U/sE4F0ve6fd9VnTyLEHvCgorYaA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 166263920088267.18570464882873; Thu, 8 Sep 2022 05:13:20 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-488-VvKQDu78ObiEDpfeVfwPYw-1; Thu, 08 Sep 2022 08:13:18 -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 13CBB1C004FB; Thu, 8 Sep 2022 12:13:15 +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 013B3492C3B; Thu, 8 Sep 2022 12:13:15 +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 EB4461946A48; Thu, 8 Sep 2022 12:13:14 +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 358B21946A44 for ; Thu, 8 Sep 2022 12:13:14 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 292C32166B29; Thu, 8 Sep 2022 12:13:14 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 996282166B26 for ; Thu, 8 Sep 2022 12:13:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662639199; 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=qr8b8drxzTz9NnxsWk2VUW0dA3qgNTdPEtbELKn21k4=; b=J8LRUb/Frt6ViRJwa5iE6ICTcs9cI2qNQzGFXjIL698VKC+UnzJd4i/8mlsijUiZoUgCOM XuO5a3cZoknhr0iMq0ViRP2tbG+e28UPcsrHHL2bPwXTtUthMx1QIXJI4czwJLmF8VjzNQ 8RMzPMuxGzI8Q4cg+ye/gUz1TQSIi4k= X-MC-Unique: VvKQDu78ObiEDpfeVfwPYw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/8] qemu: migration: Always assume support for QEMU_CAPS_NBD_SERVER Date: Thu, 8 Sep 2022 14:13:03 +0200 Message-Id: <1bfee9cf9e8dc1dc691c99aff064916708bafb9c.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: 1662639201227100001 Content-Type: text/plain; charset="utf-8" The NBD server (detected via 'nbd-server-start' qmp command) was added to qemu in v1.3 and can't be compiled out. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_migration.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 5367b74de4..995364da02 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -3147,8 +3147,7 @@ qemuMigrationDstPrepareActive(virQEMUDriver *driver, goto error; if (mig->nbd && - flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC)= && - virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_NBD_SERVER)) { + flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC)= ) { const char *nbdTLSAlias =3D NULL; if (flags & VIR_MIGRATE_TLS) { @@ -3356,8 +3355,7 @@ qemuMigrationDstPrepareFresh(virQEMUDriver *driver, } if (mig->nbd && - flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_= INC) && - virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_NBD_SERVER)) + flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_= INC)) cookieFlags |=3D QEMU_MIGRATION_COOKIE_NBD; } --=20 2.37.1 From nobody Sat May 18 00:38:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1662639203; cv=none; d=zohomail.com; s=zohoarc; b=Bhbg+2qrcLQ+WndBhpslXSWE1Iubr3MNnBQ0rSnEM/PkYteNZidg6PUx1VhiMqHHwPldLFjHmDilEkkCCJwg6kq+hIuOClatlIHWaIQ/h+WDdlz2oY6MFQDG5YgpbTiWKoHnLDziISCfgij9ej/7HTsvDib5bL7l/dSjQvOhoWc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662639203; 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=DRnFahErMTBYNDLGX/eLcsPoSCwtVZJLXgm6SFklIxY=; b=EGjftu7mcFMPh6Dl22O7eauCvYPOqQUTNC77ws9Lu0TI+CbytSYdPDrHEQ8vlCx/wtdIV10q2G62NrM6JZIpf3y6J+VARMgHVhic5nd4qeQgVkjatFrg3lWUgbc7ar5u7CxkSQHIVI97NQn1rzzvcQW0jg88w0Hn8MAma6Bnsg0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1662639203794507.6853214695353; Thu, 8 Sep 2022 05:13:23 -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-592-6NXPiGq2M7K-4Ejmg4a70g-1; Thu, 08 Sep 2022 08:13:21 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C6DD718A6539; 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 AFC651410F38; 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 77A671946A56; 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 63F281946A44 for ; Thu, 8 Sep 2022 12:13:15 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 5420F2166B26; Thu, 8 Sep 2022 12:13:15 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8D1FE2166B29 for ; Thu, 8 Sep 2022 12:13:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662639202; 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=DRnFahErMTBYNDLGX/eLcsPoSCwtVZJLXgm6SFklIxY=; b=MvSlIIpjDG0gHzyUTBiV663KgIg3Ld3FKnHLj+2dflvWegvEH/SsMg7OoANAMz3CYvcWyF 8W+1vmtgVsk799h5KNlu3LiOgKT2GMTt7UauZAygz+ZSjsRwA1JsMUrUk7zatE2DC3f4rx ncL/Uh3kmYFoXrKaQyYCZzo+8RonEeo= X-MC-Unique: 6NXPiGq2M7K-4Ejmg4a70g-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 4/8] qemu: capabilities: Retire QEMU_CAPS_NBD_SERVER Date: Thu, 8 Sep 2022 14:13:04 +0200 Message-Id: <95578e5f3fc6308f72ec830f6052844ee5675e57.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.7 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: 1662639205271100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_capabilities.c | 3 +-- src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml | 1 - tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml | 1 - 28 files changed, 2 insertions(+), 29 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 3e9983bb96..e84310c79a 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -242,7 +242,7 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 125 */ "add-fd", /* X_QEMU_CAPS_ADD_FD */ - "nbd-server", /* QEMU_CAPS_NBD_SERVER */ + "nbd-server", /* X_QEMU_CAPS_NBD_SERVER */ "virtio-rng", /* QEMU_CAPS_DEVICE_VIRTIO_RNG */ "rng-random", /* QEMU_CAPS_OBJECT_RNG_RANDOM */ "rng-egd", /* QEMU_CAPS_OBJECT_RNG_EGD */ @@ -1207,7 +1207,6 @@ struct virQEMUCapsStringFlags { struct virQEMUCapsStringFlags virQEMUCapsCommands[] =3D { { "query-spice", QEMU_CAPS_SPICE }, { "query-vnc", QEMU_CAPS_VNC }, - { "nbd-server-start", QEMU_CAPS_NBD_SERVER }, { "rtc-reset-reinjection", QEMU_CAPS_RTC_RESET_REINJECTION }, { "query-hotpluggable-cpus", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS }, { "query-cpu-model-expansion", QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION }, diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 395a3281d3..9cd00ba812 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -220,7 +220,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ /* 125 */ X_QEMU_CAPS_ADD_FD, /* -add-fd */ - QEMU_CAPS_NBD_SERVER, /* nbd-server-start QMP command */ + X_QEMU_CAPS_NBD_SERVER, /* nbd-server-start QMP command */ QEMU_CAPS_DEVICE_VIRTIO_RNG, /* virtio-rng device */ QEMU_CAPS_OBJECT_RNG_RANDOM, /* the rng-random backend for virtio rng = */ QEMU_CAPS_OBJECT_RNG_EGD, /* EGD protocol daemon for rng */ diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_4.2.0.aarch64.xml index 8af26b9e7a..8223d13409 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml @@ -31,7 +31,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_4.2.0.ppc64.xml index 24a885c279..96baa4e7bf 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml @@ -30,7 +30,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_4.2.0.s390x.xml index 2c4ba45d66..7bf0427077 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml @@ -16,7 +16,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_4.2.0.x86_64.xml index f282f6d0ab..245a0bd2fb 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml @@ -40,7 +40,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_5.0.0.aarch64.xml index 50b42bca78..250ad9d914 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml @@ -31,7 +31,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_5.0.0.ppc64.xml index 08146d2235..e356f431c2 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -30,7 +30,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml b/tests/qemu= capabilitiesdata/caps_5.0.0.riscv64.xml index 9376367a6b..19edb90927 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml @@ -34,7 +34,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.0.0.x86_64.xml index 0438554086..46bbfac186 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml @@ -40,7 +40,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml b/tests/qemuca= pabilitiesdata/caps_5.1.0.sparc.xml index 399d37218b..93ae1b6d0a 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml @@ -12,7 +12,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.1.0.x86_64.xml index a94cf90d9b..9dbe8f1ca8 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml @@ -40,7 +40,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_5.2.0.aarch64.xml index 20101d8c3b..f4c9ad1bc4 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml @@ -31,7 +31,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_5.2.0.ppc64.xml index 3ea86de12a..b40b8a5735 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml @@ -30,7 +30,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml b/tests/qemu= capabilitiesdata/caps_5.2.0.riscv64.xml index 33efb8d367..7b4915b67f 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml @@ -34,7 +34,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_5.2.0.s390x.xml index 2b65c1a2f2..0523c8d22f 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml @@ -16,7 +16,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.2.0.x86_64.xml index 0ca9043d73..c71275506a 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -40,7 +40,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_6.0.0.aarch64.xml index 8502fca633..e38e8fa5f5 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml @@ -30,7 +30,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_6.0.0.s390x.xml index a3a6b57d65..4f009def58 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml @@ -16,7 +16,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.0.0.x86_64.xml index 545df89eb1..876a5afe43 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -39,7 +39,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.1.0.x86_64.xml index 627eeb3395..f73c070c9e 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -39,7 +39,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_6.2.0.aarch64.xml index fa329f2cbc..234f386736 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml @@ -35,7 +35,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_6.2.0.ppc64.xml index 365dd8904d..4e90d3953a 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml @@ -30,7 +30,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.2.0.x86_64.xml index cc15970f6d..fd57627ad5 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml @@ -39,7 +39,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_7.0.0.aarch64.xml index 3e60c19a59..19a6c33353 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml @@ -35,7 +35,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_7.0.0.ppc64.xml index 6f985a55d0..0d3c321a67 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml @@ -36,7 +36,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_7.0.0.x86_64.xml index d48c1f733c..dc7b041294 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml @@ -39,7 +39,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_7.1.0.x86_64.xml index 9fb4ca58fa..5c60b7cf88 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml @@ -39,7 +39,6 @@ - --=20 2.37.1 From nobody Sat May 18 00:38:12 2024 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 Reviewed-by: J=C3=A1n Tomko --- 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 From nobody Sat May 18 00:38:12 2024 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=1662639255; cv=none; d=zohomail.com; s=zohoarc; b=U40689XwrdhiEVlGna4a0dNB2ehk3eKN99/6Tr1/xww8KnsFVsPDrABLxaK0HEErxUP1o7fucDaV/XLrhdDcgnhFj4pZKpkSzy3ikeztUqsuRPOE/yoe/HnqjKopvRNd1XxHmGYZrPw6wsqt8D8gzpYeTmNit66kXC4WF12ap0g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662639255; 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=9Yo1ranZrUeqxbcvqgwbvKPXxFVOcYR8ZYSQ7GXAgBU=; b=kT2nse0R1/O9zwTKI0aQz1Uw9xyY/djh2a55pYLTWN6Mc9/IY0zRGrcU4rBAsSSYnJh2VaX1bu0RoqNeP7Ar0BtBffblmaXaVEPVNGiBsnODnnymrwUk4B663p5PWFaFUDz+fKtWutYFiW9MbbGQmpkA+J2OVnLp+bKrB7tOWgw= 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 1662639255424303.8774618481493; Thu, 8 Sep 2022 05:14:15 -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-618-yRUVlKbTNvyadHvOEEh8hg-1; Thu, 08 Sep 2022 08:13:24 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 09A248039B2; Thu, 8 Sep 2022 12:13:19 +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 EB5F1403353; Thu, 8 Sep 2022 12:13:18 +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 D7DD81946A58; Thu, 8 Sep 2022 12:13:18 +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 830EC1946A5D for ; Thu, 8 Sep 2022 12:13:17 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 684FF2166B26; Thu, 8 Sep 2022 12:13:17 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id D5F782166B29 for ; Thu, 8 Sep 2022 12:13:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662639254; 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=9Yo1ranZrUeqxbcvqgwbvKPXxFVOcYR8ZYSQ7GXAgBU=; b=CUcD/sWNnV2CdqiF5TO4xdtX2+h21qz/AaS66N6sS3BSJH6hYUiaVcGD2c6YgisSlYD/H0 DeVz7oY6xTr6nJmgQLFmIczWIbE3NsOK0WebPfgcN6tUOEqWPmTQybyTQ7ooH8MCgPwE5b GiteE6RJr2k6O2kzYua1PV0sPpZ1rfQ= X-MC-Unique: yRUVlKbTNvyadHvOEEh8hg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 6/8] qemu: monitor: Drop support for old-style non-shared storage migration Date: Thu, 8 Sep 2022 14:13:06 +0200 Message-Id: <739546c5d39cd133ed14ab28b10c22df096136a2.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.10 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: 1662639255688100002 Content-Type: text/plain; charset="utf-8" Remove the support for enabling the 'blk' and 'inc' parameters of the 'migrate' command as there are no users any more. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_monitor.h | 2 -- src/qemu/qemu_monitor_json.c | 4 ---- tests/qemumonitorjsontest.c | 4 +--- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 63269e15bc..53ea26c58a 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -826,8 +826,6 @@ int qemuMonitorGetSEVCapabilities(qemuMonitor *mon, typedef enum { QEMU_MONITOR_MIGRATE_BACKGROUND =3D 1 << 0, - QEMU_MONITOR_MIGRATE_NON_SHARED_DISK =3D 1 << 1, /* migration with non-= shared storage with full disk copy */ - QEMU_MONITOR_MIGRATE_NON_SHARED_INC =3D 1 << 2, /* migration with non-= shared storage with incremental copy */ QEMU_MONITOR_MIGRATE_RESUME =3D 1 << 3, /* resume failed post-= copy migration */ QEMU_MONITOR_MIGRATION_FLAGS_LAST } QEMU_MONITOR_MIGRATE; diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 70fba50e6c..bf22cc64f8 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -3110,13 +3110,9 @@ int qemuMonitorJSONMigrate(qemuMonitor *mon, const char *uri) { bool detach =3D !!(flags & QEMU_MONITOR_MIGRATE_BACKGROUND); - bool blk =3D !!(flags & QEMU_MONITOR_MIGRATE_NON_SHARED_DISK); - bool inc =3D !!(flags & QEMU_MONITOR_MIGRATE_NON_SHARED_INC); bool resume =3D !!(flags & QEMU_MONITOR_MIGRATE_RESUME); g_autoptr(virJSONValue) cmd =3D qemuMonitorJSONMakeCommand("migrate", "b:detach", d= etach, - "b:blk", blk, - "b:inc", inc, "b:resume", r= esume, "s:uri", uri, NULL); diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index b508f63aea..fa5455e513 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1201,9 +1201,7 @@ GEN_TEST_FUNC(qemuMonitorJSONExpirePassword, "spice",= "123456") GEN_TEST_FUNC(qemuMonitorJSONSetBalloon, 1024) GEN_TEST_FUNC(qemuMonitorJSONSaveVirtualMemory, 0, 1024, "/foo/bar") GEN_TEST_FUNC(qemuMonitorJSONSavePhysicalMemory, 0, 1024, "/foo/bar") -GEN_TEST_FUNC(qemuMonitorJSONMigrate, QEMU_MONITOR_MIGRATE_BACKGROUND | - QEMU_MONITOR_MIGRATE_NON_SHARED_DISK | - QEMU_MONITOR_MIGRATE_NON_SHARED_INC, "tcp:localhost:12345") +GEN_TEST_FUNC(qemuMonitorJSONMigrate, QEMU_MONITOR_MIGRATE_BACKGROUND, "tc= p:localhost:12345") GEN_TEST_FUNC(qemuMonitorJSONMigrateRecover, "tcp://destination.host:54321= "); GEN_TEST_FUNC(qemuMonitorJSONDump, "dummy_protocol", "elf", true) --=20 2.37.1 From nobody Sat May 18 00:38:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1662639208; cv=none; d=zohomail.com; s=zohoarc; b=SqHFCfPCtlTIdRU2uc3GGjKAXbBnGHaTg+jlEx3WbkhN8bEVsJuEpD4asUVw0TJKZRCnv3rO3E1gsmduNE8f7VS5TJWV/84wah6a9DvXoNShaRJTfqEX8w//ycrkLEVlDp06kzkRiFBa+6MVR4MzqBaWy7j9BvwNXtoi05jmIss= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662639208; 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=67mZdmYs/hN4k9EuasQZ/rkGCnhRIQG04zBg2tLMPhs=; b=HLZExkQR+U76jPfI46GJ6QFohoUuG7gYm0J8uBjWjw/uJHLHaHNWiXdkqqyhz/KrV1HkJlermiJTxQPymawh9uQueO1cH1ZQL+wFkIuC5HySIZ46ELJW/ihetLoBcwBv3Kjf2M4WsZEy81dOBm70MA2p6svEa+I2Hxnpa9fFV+s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1662639208038465.58128765389904; Thu, 8 Sep 2022 05:13:28 -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-588-UqSiQHqJPLuJ-vXHU1IWDQ-1; Thu, 08 Sep 2022 08:13:23 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0EA2E85A597; Thu, 8 Sep 2022 12:13:20 +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 EF72A492C3B; Thu, 8 Sep 2022 12:13:19 +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 DC3861946A48; Thu, 8 Sep 2022 12:13:19 +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 635471946A44 for ; Thu, 8 Sep 2022 12:13:18 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 558B72166B29; Thu, 8 Sep 2022 12:13:18 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id C0C1E2166B26 for ; Thu, 8 Sep 2022 12:13:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662639207; 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=67mZdmYs/hN4k9EuasQZ/rkGCnhRIQG04zBg2tLMPhs=; b=fNLuDQD5RzzsEk4uVFc7l89XXXNwoVM4Qa9GZ40xlHOzdK4358t4DVPd5fFXdrjDVSvRMP scVmZvgijJ0L+nn3YnpIpk3QIsC/1g12F3c9eIOan3n2ZTKCS62W5Auw+p+qrTR5E1WIWW BD5OuhD21B5Sm9EafsUpoecPD1DDFr0= X-MC-Unique: UqSiQHqJPLuJ-vXHU1IWDQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 7/8] qemu: migration: Remove QEMU_MONITOR_MIGRATE_BACKGROUND Date: Thu, 8 Sep 2022 14:13:07 +0200 Message-Id: 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.10 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: 1662639209266100002 Content-Type: text/plain; charset="utf-8" 'qemuMonitorJSONMigrate' is called from: - qemuMonitorMigrateToHost - qemuMonitorMigrateToSocket Both of the above function are called only from qemuMigrationSrcStart. - qemuMonitorMigrateToFd - called from: - qemuMigrationSrcToFile Both instances here pass QEMU_MONITOR_MIGRATE_BACKGROUND directly. - qemuMigrationSrcStart qemuMigrationSrcStart is then called from qemuMigrationSrcRun and qemuMigrationSrcResume, both of which always add QEMU_MONITOR_MIGRATE_BACKG= ROUND to the flags. Thus any caller always passes the flag so that we can remove the flag altogether. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_migration.c | 15 ++++----------- src/qemu/qemu_monitor.h | 1 - src/qemu/qemu_monitor_json.c | 3 +-- tests/qemumonitorjsontest.c | 2 +- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 7dc593d49f..c63b00c922 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -4678,7 +4678,6 @@ qemuMigrationSrcRun(virQEMUDriver *driver, const char *nbdURI) { int ret =3D -1; - unsigned int migrate_flags =3D QEMU_MONITOR_MIGRATE_BACKGROUND; qemuDomainObjPrivate *priv =3D vm->privateData; g_autoptr(qemuMigrationCookie) mig =3D NULL; g_autofree char *tlsAlias =3D NULL; @@ -4867,7 +4866,7 @@ qemuMigrationSrcRun(virQEMUDriver *driver, goto exit_monitor; } - rc =3D qemuMigrationSrcStart(vm, spec, migrate_flags, &fd); + rc =3D qemuMigrationSrcStart(vm, spec, 0, &fd); qemuDomainObjExitMonitor(vm); if (rc < 0) @@ -5033,8 +5032,6 @@ qemuMigrationSrcResume(virDomainObj *vm, qemuDomainObjPrivate *priv =3D vm->privateData; virQEMUDriver *driver =3D priv->driver; g_autoptr(qemuMigrationCookie) mig =3D NULL; - unsigned int migrateFlags =3D QEMU_MONITOR_MIGRATE_BACKGROUND | - QEMU_MONITOR_MIGRATE_RESUME; int rc; VIR_DEBUG("vm=3D%p", vm); @@ -5053,7 +5050,7 @@ qemuMigrationSrcResume(virDomainObj *vm, VIR_ASYNC_JOB_MIGRATION_OUT) < 0) return -1; - rc =3D qemuMigrationSrcStart(vm, spec, migrateFlags, NULL); + rc =3D qemuMigrationSrcStart(vm, spec, QEMU_MONITOR_MIGRATE_RESUME, NU= LL); qemuDomainObjExitMonitor(vm); if (rc < 0) @@ -6902,9 +6899,7 @@ qemuMigrationSrcToFile(virQEMUDriver *driver, virDoma= inObj *vm, goto cleanup; if (!compressor) { - rc =3D qemuMonitorMigrateToFd(priv->mon, - QEMU_MONITOR_MIGRATE_BACKGROUND, - fd); + rc =3D qemuMonitorMigrateToFd(priv->mon, 0, fd); } else { virCommandSetInputFD(compressor, pipeFD[0]); virCommandSetOutputFD(compressor, &fd); @@ -6920,9 +6915,7 @@ qemuMigrationSrcToFile(virQEMUDriver *driver, virDoma= inObj *vm, qemuDomainObjExitMonitor(vm); goto cleanup; } - rc =3D qemuMonitorMigrateToFd(priv->mon, - QEMU_MONITOR_MIGRATE_BACKGROUND, - pipeFD[1]); + rc =3D qemuMonitorMigrateToFd(priv->mon, 0, pipeFD[1]); if (VIR_CLOSE(pipeFD[0]) < 0 || VIR_CLOSE(pipeFD[1]) < 0) VIR_WARN("failed to close intermediate pipe"); diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 53ea26c58a..c256e0f5ba 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -825,7 +825,6 @@ int qemuMonitorGetSEVCapabilities(qemuMonitor *mon, virSEVCapability **capabilities); typedef enum { - QEMU_MONITOR_MIGRATE_BACKGROUND =3D 1 << 0, QEMU_MONITOR_MIGRATE_RESUME =3D 1 << 3, /* resume failed post-= copy migration */ QEMU_MONITOR_MIGRATION_FLAGS_LAST } QEMU_MONITOR_MIGRATE; diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index bf22cc64f8..031238665f 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -3109,10 +3109,9 @@ int qemuMonitorJSONMigrate(qemuMonitor *mon, unsigned int flags, const char *uri) { - bool detach =3D !!(flags & QEMU_MONITOR_MIGRATE_BACKGROUND); bool resume =3D !!(flags & QEMU_MONITOR_MIGRATE_RESUME); g_autoptr(virJSONValue) cmd =3D qemuMonitorJSONMakeCommand("migrate", - "b:detach", d= etach, + "b:detach", t= rue, "b:resume", r= esume, "s:uri", uri, NULL); diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index fa5455e513..238c6c1813 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1201,7 +1201,7 @@ GEN_TEST_FUNC(qemuMonitorJSONExpirePassword, "spice",= "123456") GEN_TEST_FUNC(qemuMonitorJSONSetBalloon, 1024) GEN_TEST_FUNC(qemuMonitorJSONSaveVirtualMemory, 0, 1024, "/foo/bar") GEN_TEST_FUNC(qemuMonitorJSONSavePhysicalMemory, 0, 1024, "/foo/bar") -GEN_TEST_FUNC(qemuMonitorJSONMigrate, QEMU_MONITOR_MIGRATE_BACKGROUND, "tc= p:localhost:12345") +GEN_TEST_FUNC(qemuMonitorJSONMigrate, 0, "tcp:localhost:12345") GEN_TEST_FUNC(qemuMonitorJSONMigrateRecover, "tcp://destination.host:54321= "); GEN_TEST_FUNC(qemuMonitorJSONDump, "dummy_protocol", "elf", true) --=20 2.37.1 From nobody Sat May 18 00:38:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1662639255; cv=none; d=zohomail.com; s=zohoarc; b=E3CG8TrRz3iU+tfT2s5poDlFDKo3Fqm87rZzxfV1w+s4QOa/2W8TBxbcaZgwvzb4lxFxjDl3GQZZY9cRfTRcAeEy5168+avwqUb9YOqBq8Q44e1Bnn+StWBCGmgCBVL9vSGg0BEMa/MPTPv+T5LB8xofYW8CZwimPs9+YkH6Kwo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662639255; 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=Wkd6cphL/tlG7bVY/mOlw2mjCVWty/41pq0w0Ijw4bo=; b=L5o9UMlF3REDn1/J9I+Sbi5iKeZ0iAH5DNuJQudwWagZnsxVFkyWsZ3Oqq28jip58NVCyxc5wA1po3NGqMCmhPO1XSAwtfJLsHnCsahrf61r9SXWM0GfPxeVWhGo1OGwLOmaypvURbrpo4SLHfxafcgYyFWM15ogDtUhSrYtjec= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 16626392551765.901032243008785; Thu, 8 Sep 2022 05:14:15 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-573-BFJ5DAFkNzaEKWoe95mBYg-1; Thu, 08 Sep 2022 08:13:24 -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 5B2003C0ED45; Thu, 8 Sep 2022 12:13:21 +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 4631D492CA2; Thu, 8 Sep 2022 12:13:21 +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 28BB91946A48; Thu, 8 Sep 2022 12:13:21 +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 819C51946A48 for ; Thu, 8 Sep 2022 12:13:19 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 40DA32166B29; Thu, 8 Sep 2022 12:13:19 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id B0D652166B26 for ; Thu, 8 Sep 2022 12:13:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662639254; 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=Wkd6cphL/tlG7bVY/mOlw2mjCVWty/41pq0w0Ijw4bo=; b=DDudEQjHrbOC1s/eD2u0AtulAtv25t3s0BXtuQEy6S3xqofCjHyw6pP5j+rUBayk1h8o2r BiF1T/GZSaG+5YOqFpk8/guTRK7Ql5jqxXAO1jckszf7JA2W6i5O9+GI3BnHlBgZ/EK6TJ vZx64yd8gWIvXwWG8aGVxBZJcVwhfmg= X-MC-Unique: BFJ5DAFkNzaEKWoe95mBYg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 8/8] qemu: monitor: Renumber QEMU_MONITOR_MIGRATE_RESUME Date: Thu, 8 Sep 2022 14:13:08 +0200 Message-Id: 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: 1662639255675100001 Content-Type: text/plain; charset="utf-8" Now that all preceding flags were deleted we can fix the enum value. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_monitor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index c256e0f5ba..4d770486be 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -825,7 +825,7 @@ int qemuMonitorGetSEVCapabilities(qemuMonitor *mon, virSEVCapability **capabilities); typedef enum { - QEMU_MONITOR_MIGRATE_RESUME =3D 1 << 3, /* resume failed post-= copy migration */ + QEMU_MONITOR_MIGRATE_RESUME =3D 1 << 0, /* resume failed post-= copy migration */ QEMU_MONITOR_MIGRATION_FLAGS_LAST } QEMU_MONITOR_MIGRATE; --=20 2.37.1