From nobody Mon Feb 9 16:45:17 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1695833705; cv=none; d=zohomail.com; s=zohoarc; b=WoSRpgF0xAoJqdh9RgXqSAwM/265WrvACVIjIU5bnSA0vunUqeev6Q4vANAlgxu3AQh5nTAPPKsi8XN5vrZS/6KXzazoRItml1oYL7CkKvt+VD9a5G/us232Jt4mgrdaDzUFyTiwgD7hAEZlBo6NjYXYOY+e6tsJJ6nTwVL6fxA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695833705; h=Content-Type:Content-Transfer-Encoding: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=RDa4fFqAGTfltrK3rhlUlPrDSCjrBhbhFEvJiI3EMcw=; b=XurRb4UA+00TLu2RsXOBaRCEthBjoGHhuVQz8Aq2bm1Mw2ppT4w2+ryn9PcJIIWmZgUxrl1nNhQ7ox7fWw0Ff1GHDi9VnYEFqAve0bwdUM4+DamD/wcCWv+UY8HO7MywY2W5sVFs2TfIk16ES/qPZHdDXQ6GjyIHu4hddu+hxUo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1695833705323653.9221368865623; Wed, 27 Sep 2023 09:55:05 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-367-PJECE263OWq6EgUavH93sw-1; Wed, 27 Sep 2023 12:54:50 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (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 69FF4280FED1; Wed, 27 Sep 2023 16:54:47 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 502CC2026D68; Wed, 27 Sep 2023 16:54:47 +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 2CEC61946A54; Wed, 27 Sep 2023 16:54:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E547219465A8 for ; Wed, 27 Sep 2023 16:21:01 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id BCD3E1054FD4; Wed, 27 Sep 2023 16:19:54 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.45.226.180]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5106A1054FD3 for ; Wed, 27 Sep 2023 16:19:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695833704; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=RDa4fFqAGTfltrK3rhlUlPrDSCjrBhbhFEvJiI3EMcw=; b=bvW/3VccgFBo09nJTJRdQNEGMQqadWkCp+kq4m8l3WSERAYr7PtyAR9R3ysQa7RT4R1Bga 7ee5bdBYffgLyZTkHwbpInD70GG7Lavo5+E15oALzDl8kfrpbcD5Eq26gSNUgd1+/UpZqK 4tCAFSfPPhgNakd/OXJRXCVxCl4TsYg= X-MC-Unique: PJECE263OWq6EgUavH93sw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 25/33] systemd: Replace Requires with BindTo+After for main socket Date: Wed, 27 Sep 2023 18:19:26 +0200 Message-ID: <20230927161934.181728-26-abologna@redhat.com> In-Reply-To: <20230927161934.181728-1-abologna@redhat.com> References: <20230927161934.181728-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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: 1695833706262100001 Content-Type: text/plain; charset="utf-8"; x-default="true" This is the strongest relationship that can be declared between two units, and causes the service to be terminated immediately if its main socket disappears. This is the behavior we want. Note that we don't do the same for the read-only/admin sockets, because those are not as critical for the core functionality of services as the main socket it. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- src/locking/virtlockd.service.in | 3 ++- src/logging/virtlogd.service.in | 3 ++- src/virtd.service.in | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.servi= ce.in index 9e91fa3261..35924a2ad7 100644 --- a/src/locking/virtlockd.service.in +++ b/src/locking/virtlockd.service.in @@ -1,7 +1,8 @@ [Unit] Description=3DVirtual machine lock manager -Requires=3Dvirtlockd.socket +BindsTo=3Dvirtlockd.socket Requires=3Dvirtlockd-admin.socket +After=3Dvirtlockd.socket Before=3Dlibvirtd.service Documentation=3Dman:virtlockd(8) Documentation=3Dhttps://libvirt.org diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service= .in index 97c942ffb0..79d34bc73e 100644 --- a/src/logging/virtlogd.service.in +++ b/src/logging/virtlogd.service.in @@ -1,7 +1,8 @@ [Unit] Description=3DVirtual machine log manager -Requires=3Dvirtlogd.socket +BindsTo=3Dvirtlogd.socket Requires=3Dvirtlogd-admin.socket +After=3Dvirtlogd.socket Before=3Dlibvirtd.service Documentation=3Dman:virtlogd(8) Documentation=3Dhttps://libvirt.org diff --git a/src/virtd.service.in b/src/virtd.service.in index 60ab122cbc..e7f08b4da9 100644 --- a/src/virtd.service.in +++ b/src/virtd.service.in @@ -1,8 +1,9 @@ [Unit] Description=3D@name@ daemon -Requires=3D@service@.socket +BindsTo=3D@service@.socket Requires=3D@service@-ro.socket Requires=3D@service@-admin.socket +After=3D@service@.socket Conflicts=3Dlibvirtd.service After=3Dlibvirtd.service After=3Dnetwork.target --=20 2.41.0