From nobody Mon Feb 9 05:01:58 2026 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=1654088049; cv=none; d=zohomail.com; s=zohoarc; b=AhhtSmG0R7QE7npBBZlaSoVu77cLk7/4uNsMTyK40QfuK13jC+YppaSOWKp3MOYgKZmnfFScC4KykneawjAzkQwUaMgn27b+3+mfW9z7HxMxf7GXeGwirFerV5EkFbP/OKUgGh45Rq2yZYzdbIpJ1HiwLjcz3Fc4TAFP2+o8+EY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654088049; h=Content-Type:Content-Transfer-Encoding:Cc: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=RDAB/wNSzJNLObBVxcCvnPXC1vo0p474YOeRmhM0Mj8=; b=hgKuvErTTk+wR/ybD3VRLzccv3FGz/Ro/74ym7vd9Q6gM0+veBU6NPY0k8tbdIOy+Ob22KPEX7hM+zPL4YPeq6UQXkzxio9UU/TNQ4v6GWzte6yeKPA96m4Mp/rTRvHnzIzNz13MRhCdOMPWC4GFEWEItchfWr5xmgsAUZn/cNw= 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 165408804991336.10080177364296; Wed, 1 Jun 2022 05:54:09 -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-433-X7Rc1N4dOz6h2lemlyohQQ-1; Wed, 01 Jun 2022 08:51:42 -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 AB63881B90E; Wed, 1 Jun 2022 12:50:51 +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 9603E492C3B; Wed, 1 Jun 2022 12:50:51 +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 F28BB1955EEF; Wed, 1 Jun 2022 12:50:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6B1961947BAD for ; Wed, 1 Jun 2022 12:50:31 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 49D362026987; Wed, 1 Jun 2022 12:50:31 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.227]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 295E4202699A; Wed, 1 Jun 2022 12:50:31 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id B5682245B8D; Wed, 1 Jun 2022 14:50:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654088048; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=RDAB/wNSzJNLObBVxcCvnPXC1vo0p474YOeRmhM0Mj8=; b=Q0aNMNrQbqCSQ0ogrHSKeuMBVt8rDRGgpJLmX9sNexImAKgvHUF7uBZ/IcULv2mbeNg484 qyWB1dPNTwWCxLsDLltq7li+ovLhfnDF1Ko/rKDlARshN1e0fos2OKYeLDhWUHwy6Mt8r1 dJTgTpA1Bz7dp4+DKc65v8AvPBojg94= X-MC-Unique: X7Rc1N4dOz6h2lemlyohQQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH v2 64/81] qemu: Handle incoming migration in qemuMigrationAnyConnectionClosed Date: Wed, 1 Jun 2022 14:50:04 +0200 Message-Id: <65814fc940ec15f9ba1c6cbd841347f60d0f17b4.1654087150.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 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: , Cc: Peter Krempa , Pavel Hrdina Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1654088050715100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark Reviewed-by: Peter Krempa Reviewed-by: Pavel Hrdina --- Notes: Version 2: - part of this patch squashed into the previous one src/qemu/qemu_migration.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 92833ccbe3..1396c1d9b4 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2350,12 +2350,12 @@ qemuMigrationAnyConnectionClosed(virDomainObj *vm, case QEMU_MIGRATION_PHASE_POSTCOPY_FAILED: case QEMU_MIGRATION_PHASE_BEGIN_RESUME: case QEMU_MIGRATION_PHASE_PERFORM_RESUME: + case QEMU_MIGRATION_PHASE_PREPARE_RESUME: VIR_DEBUG("Connection closed while resuming failed post-copy migra= tion"); postcopy =3D true; break; =20 case QEMU_MIGRATION_PHASE_PREPARE: - case QEMU_MIGRATION_PHASE_PREPARE_RESUME: /* incoming migration; the domain will be autodestroyed */ return; =20 @@ -2379,6 +2379,8 @@ qemuMigrationAnyConnectionClosed(virDomainObj *vm, if (postcopy) { if (priv->job.asyncJob =3D=3D VIR_ASYNC_JOB_MIGRATION_OUT) qemuMigrationSrcPostcopyFailed(vm); + else + qemuMigrationDstPostcopyFailed(vm); ignore_value(qemuMigrationJobSetPhase(vm, QEMU_MIGRATION_PHASE_POS= TCOPY_FAILED)); qemuDomainCleanupAdd(vm, qemuProcessCleanupMigrationJob); qemuMigrationJobContinue(vm); --=20 2.35.1