From nobody Sun May 19 04:56:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1632647445183743.1695690591235; Sun, 26 Sep 2021 02:10:45 -0700 (PDT) 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-177-DMIHG1omMMG6CNbg3W8rEg-1; Sun, 26 Sep 2021 05:10:42 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7437A1808310; Sun, 26 Sep 2021 09:10:36 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 054741F423; Sun, 26 Sep 2021 09:10:33 +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 276C01801241; Sun, 26 Sep 2021 09:10:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 18Q9AOnC006811 for ; Sun, 26 Sep 2021 05:10:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 643602167819; Sun, 26 Sep 2021 09:10:24 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5EBFF2167815 for ; Sun, 26 Sep 2021 09:10:21 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BFAF9800883 for ; Sun, 26 Sep 2021 09:10:21 +0000 (UTC) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-191-lXmoETxKPm-k_BHjRKoHpw-1; Sun, 26 Sep 2021 05:10:19 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2021 02:09:15 -0700 Received: from duan-server-s2600bt.bj.intel.com ([10.240.192.107]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2021 02:09:14 -0700 X-MC-Unique: DMIHG1omMMG6CNbg3W8rEg-1 X-MC-Unique: lXmoETxKPm-k_BHjRKoHpw-1 X-IronPort-AV: E=McAfee;i="6200,9189,10118"; a="287993095" X-IronPort-AV: E=Sophos;i="5.85,323,1624345200"; d="scan'208";a="287993095" X-IronPort-AV: E=Sophos;i="5.85,323,1624345200"; d="scan'208";a="552446568" From: Zhenzhong Duan To: libvir-list@redhat.com Subject: [PATCH] qemu: ingore the transient domain state in fake reboot Date: Sun, 26 Sep 2021 17:06:38 +0800 Message-Id: <20210926090638.160157-1-zhenzhong.duan@intel.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 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.84 on 10.5.11.23 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-ZM-MESSAGEID: 1632647447418100001 Content-Type: text/plain; charset="utf-8" When action for 'on_poweroff' is set to 'restart', 'fake reboot' is triggered and qemu shutdown state is transient. Domain state need not to be changed and events not sent in this case. Fixes:4ffc807214cb80086d57e1d3e7b60959a41d2874 Signed-off-by: Zhenzhong Duan Reviewed-by: Michal Privoznik --- src/qemu/qemu_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 632cb817b9..fcdda4ffe1 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -612,7 +612,7 @@ qemuProcessHandleShutdown(qemuMonitor *mon G_GNUC_UNUSE= D, =20 /* In case of fake reboot qemu shutdown state is transient so don't * change domain state nor send events. */ - if (!priv->fakeReboot || + if (!priv->fakeReboot && vm->def->onPoweroff !=3D VIR_DOMAIN_LIFECYCLE_ACTION_RESTART) { VIR_DEBUG("Transitioned guest %s to shutdown state", vm->def->name); --=20 2.25.1