From nobody Mon Apr 29 13:26:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1579180695; cv=none; d=zohomail.com; s=zohoarc; b=SMW8mX/ypDr5X4mHxXwotnC8FegZsPPNvUeuskLWoGJFI6/5k2Cu6lDwVZHmA+XW9qx3eTbFdAMBvPWeRZPvvNowfdZ9CsyDJGeqfkmMYhSoCWtyDUXgtZFdWYCKoNMknBqwf2Yp3RuISu9ANZiFzniav6E/q+B1nxkqCKSa4uE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579180695; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=PFtAXbOoyDjFYIwsU5RC+5jLJZFNosHQ+6OmfStaRjc=; b=mPwtuHHOFNt2Nx/64ns+nx03o1HhzLd41wsHyV2LCGfVhBd4ySb2HqadtU44ZAXwhWhEM7WWPKWT0bYYN3sn1otsd64ZH6lo6Be2/5PQZkG7wMISULQNWBVSQ11EoQ8ctHuFVwuAqaLYPcDnQKahWruRQRfwKh7aLhhIwJ2zwA0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1579180695270633.3625513236819; Thu, 16 Jan 2020 05:18:15 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-263-A15UeIbBMY2b1YHWnBdfXA-1; Thu, 16 Jan 2020 08:18:12 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4044490AEE; Thu, 16 Jan 2020 13:18:07 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 15FC9845B9; Thu, 16 Jan 2020 13:18:07 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C0B5E845D9; Thu, 16 Jan 2020 13:18:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 00GDI5hZ017288 for ; Thu, 16 Jan 2020 08:18:05 -0500 Received: by smtp.corp.redhat.com (Postfix) id 39DB94B4; Thu, 16 Jan 2020 13:18:05 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.188]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0D8054AF for ; Thu, 16 Jan 2020 13:18:01 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 189C410056D; Thu, 16 Jan 2020 14:18:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579180694; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=PFtAXbOoyDjFYIwsU5RC+5jLJZFNosHQ+6OmfStaRjc=; b=S9Jnig5q/UhFQkDFjOEs2vc7224dsjUoatj0/17haUQpB8qcxiUE+esI2LejXst33TI0rq hMTaA5ZHhfb/9E8gK+XOwr8vQ/AcuB80J61FF4P2i4Dzdr2Hrl32EPetFuKvPJUSoTvCF5 u6UocumDXwAkO5hpWPx1pM1plC/Kcmc= From: Jiri Denemark To: libvir-list@redhat.com Subject: [PATCH] qemu: Don't emit SUSPENDED_POSTCOPY event on destination Date: Thu, 16 Jan 2020 14:17:49 +0100 Message-Id: <6b02e03938cc4527d23a0aeccc3186a66a452419.1579180669.git.jdenemar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: A15UeIbBMY2b1YHWnBdfXA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" When pause-before-switchover QEMU capability is enabled, we get STOP event before MIGRATION event with postcopy-active state. To properly handle post-copy migration and emit correct events commit v4.10.0-rc1-4-geca9d21e6c added a hack to qemuProcessHandleMigrationStatus which translates the paused state reason to VIR_DOMAIN_PAUSED_POSTCOPY and emits VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY event when migration state changes to post-copy. However, the code was effective on both sides of migration resulting in a confusing VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY event on the destination host, where entering post-copy mode is already properly advertised by VIR_DOMAIN_EVENT_RESUMED_POSTCOPY event. https://bugzilla.redhat.com/show_bug.cgi?id=3D1791458 Signed-off-by: Jiri Denemark Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 4195042194..a7bbab9e56 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -1653,6 +1653,7 @@ qemuProcessHandleMigrationStatus(qemuMonitorPtr mon G= _GNUC_UNUSED, virDomainObjBroadcast(vm); =20 if (status =3D=3D QEMU_MONITOR_MIGRATION_STATUS_POSTCOPY && + priv->job.asyncJob =3D=3D QEMU_ASYNC_JOB_MIGRATION_OUT && virDomainObjGetState(vm, &reason) =3D=3D VIR_DOMAIN_PAUSED && reason =3D=3D VIR_DOMAIN_PAUSED_MIGRATION) { VIR_DEBUG("Correcting paused state reason for domain %s to %s", --=20 2.25.0