From nobody Tue Feb 10 11:18:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1533510113403548.7565295963506; Sun, 5 Aug 2018 16:01:53 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E876E308A956; Sun, 5 Aug 2018 23:01:50 +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 AECED80D8F; Sun, 5 Aug 2018 23:01:50 +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 5E6F74A469; Sun, 5 Aug 2018 23:01:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w75N1MHQ016483 for ; Sun, 5 Aug 2018 19:01:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id 72513308BDA6; Sun, 5 Aug 2018 23:01:22 +0000 (UTC) Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63F5C308BDA4 for ; Sun, 5 Aug 2018 23:01:20 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CA8D74E900 for ; Sun, 5 Aug 2018 23:01:19 +0000 (UTC) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 35088214E0; Sun, 5 Aug 2018 19:01:18 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Sun, 05 Aug 2018 19:01:19 -0400 Received: from localhost.localdomain (ip5b40bfaa.dynamic.kabel-deutschland.de [91.64.191.170]) by mail.messagingengine.com (Postfix) with ESMTPA id EF07AE425A; Sun, 5 Aug 2018 19:01:17 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:in-reply-to:message-id:mime-version :references:references:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=x0XSNP2vqMQbFZ1JpBy2WqX48x3wcSa2oRvrXYmKs 2E=; b=ka/XbLkIwBeSqaBVUUSxU92ju8gYRH6Mf7tCxpWwseFkxdtew4e0QZy2u NIQfACZB0UEH5P5qPfo/sKKw4cnqti5MXHrkPqOxYiR60OvoMTjA1uEaf2H7rmya R1XdCITmwKNz44Mtdk+haDI6jt89eRlVhl7fFJ+IsSMhwfxymi2ZOf9cAZhID8RC 0EL3p0KEvvDexJo85BLRE95dR8nk3B3CxMkfhxObN9W68JBDE48DPLjvfTBQrFDU EixbxsP79ScepLMiu2UkPmd+scSFg4gKRaPBFFGjXP985v6fcr84wwFyhVKyjJ62 PNwEfOnq/pHkSGa5imvAcCV/EmbRg== X-ME-Proxy: X-ME-Sender: From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: libvir-list@redhat.com Date: Mon, 6 Aug 2018 01:01:09 +0200 Message-Id: <546faeef72f1715adffc8730f6b066b59385eb35.1533510021.git-series.marmarek@invisiblethingslab.com> In-Reply-To: References: MIME-Version: 1.0 In-Reply-To: References: X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 209 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Sun, 05 Aug 2018 23:01:19 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Sun, 05 Aug 2018 23:01:19 +0000 (UTC) for IP:'66.111.4.25' DOMAIN:'out1-smtp.messagingengine.com' HELO:'out1-smtp.messagingengine.com' FROM:'marmarek@invisiblethingslab.com' RCPT:'' X-RedHat-Spam-Score: -0.701 (DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS) 66.111.4.25 out1-smtp.messagingengine.com 66.111.4.25 out1-smtp.messagingengine.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/3] libxl: initialize domain state with real data 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Sun, 05 Aug 2018 23:01:51 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 When libvirtd is started, initialize domain objects state with its real state, not only RUNNING/SHUTOFF. Signed-off-by: Marek Marczykowski-G=C3=B3recki Reviewed-by: Jim Fehlig --- src/libxl/libxl_driver.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 10c7aab..16b3146 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -412,6 +412,17 @@ libxlReconnectDomain(virDomainObjPtr vm, vm->def, hostdev_flags) < 0) goto error; =20 + if (d_info.shutdown && + d_info.shutdown_reason =3D=3D LIBXL_SHUTDOWN_REASON_SUSPEND) + virDomainObjSetState(vm, VIR_DOMAIN_PMSUSPENDED, + VIR_DOMAIN_PMSUSPENDED_UNKNOWN); + else if (d_info.paused) + virDomainObjSetState(vm, VIR_DOMAIN_PAUSED, + VIR_DOMAIN_PAUSED_UNKNOWN); + else + virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, + VIR_DOMAIN_RUNNING_UNKNOWN); + if (virAtomicIntInc(&driver->nactive) =3D=3D 1 && driver->inhibitCallb= ack) driver->inhibitCallback(true, driver->inhibitOpaque); =20 --=20 git-series 0.9.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list