From nobody Tue Apr 30 20:51:35 2024 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 1515624651007690.8651654313252; Wed, 10 Jan 2018 14:50:51 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5E32A7EAA3; Wed, 10 Jan 2018 22:50:48 +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 08A01608F0; Wed, 10 Jan 2018 22:50:47 +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 07AFC4ED37; Wed, 10 Jan 2018 22:50:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w0AM7I7m006559 for ; Wed, 10 Jan 2018 17:07:20 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7822460C4B; Wed, 10 Jan 2018 22:07:17 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 71E9B8D653 for ; Wed, 10 Jan 2018 22:07:15 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6DF50C03BD52 for ; Wed, 10 Jan 2018 22:07:13 +0000 (UTC) Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9EF25AF29 for ; Wed, 10 Jan 2018 22:07:06 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: =?UTF-8?q?Michal=20Koutn=C3=BD?= To: libvir-list@redhat.com Date: Wed, 10 Jan 2018 23:06:41 +0100 Message-Id: <20180110220641.23203-1-mkoutny@suse.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 10 Jan 2018 22:07:13 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 10 Jan 2018 22:07:13 +0000 (UTC) for IP:'195.135.220.15' DOMAIN:'mx2.suse.de' HELO:'mx2.suse.de' FROM:'mkoutny@suse.com' RCPT:'' X-RedHat-Spam-Score: -2.301 (RCVD_IN_DNSWL_MED, SPF_PASS) 195.135.220.15 mx2.suse.de 195.135.220.15 mx2.suse.de X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com X-Mailman-Approved-At: Wed, 10 Jan 2018 17:50:38 -0500 Cc: mkoutny@suse.com Subject: [libvirt] [PATCH] libvirtd: Explicit dependency on systemd-machined 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: , MIME-Version: 1.0 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 10 Jan 2018 22:50:49 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The libvirtd daemon uses systemd-machined D-Bus API when manipulating domains. The systemd-machined is D-Bus activated on demand. However, during system shutdown systemd-machined is stopped concurrently with libvirtd and virsh users also doing their final cleanup may transitively fail due to unavailability of systemd-machined. Example error message > libvirtd[1390]: 2017-12-20 18:55:56.182+0000: 32700: error : virSystemdTe= rminateMachine:503 : Refusing activation, D-Bus is shutting down. To circumvent this we need to explicitly specify both ordering and requirement dependency (to avoid late D-Bus activation) on systemd-machined. See [1] for the dependency debate. [1] https://lists.freedesktop.org/archives/systemd-devel/2018-January/04009= 5.html --- The Wants=3D dependency is for the case when systemd-machined wasn't started neither D-Bus activated anytime before the shutdown transaction. AFAICS thi= s is very unlikely so for the sake of lazy activation, the Wants=3D hunk can be dropped. daemon/libvirtd.service.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemon/libvirtd.service.in b/daemon/libvirtd.service.in index c189f5e65..769702ea7 100644 --- a/daemon/libvirtd.service.in +++ b/daemon/libvirtd.service.in @@ -7,6 +7,7 @@ Description=3DVirtualization daemon Requires=3Dvirtlogd.socket Requires=3Dvirtlockd.socket +Wants=3Dsystemd-machined.service Before=3Dlibvirt-guests.service After=3Dnetwork.target After=3Ddbus.service @@ -14,6 +15,7 @@ After=3Discsid.service After=3Dapparmor.service After=3Dlocal-fs.target After=3Dremote-fs.target +After=3Dsystemd-machined.service Documentation=3Dman:libvirtd(8) Documentation=3Dhttps://libvirt.org =20 --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list