From nobody Fri May 17 09:01:23 2024 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=1696236697; cv=none; d=zohomail.com; s=zohoarc; b=EmTpJl81EBMcTi0OOueZZkSRiWerOuTZFZCDWeeSmWidXojAHxFWdaItMAVedMMctjDHkt1oSqrNz/j0fZxi2C+nveqwfjis5e66wIZ0UD23JI60BH8FTloTvbhyE4n2lhFB1aLYG3SNx8jJe6Qmr5ZrFpx1BFflRvMmb4D9hhU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696236697; 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=yky/SRTjW9fEqNqhe/VeKOmrFsS5gPFZtu3lv0MiLOQ=; b=fYskWNdcPwEH2sxCrwXGcyNuotcaPhOE7ugr1JahGla+CGE2qy3P3uYKt5HlA4xgEZFdBTD+e98++A59DYomq+KpSlZFf0l/UILTujvXq9PkICexmasZPynDwMJJrnhwwz1J0h9UnvueyFLJiQo3FdgFq+rTp3JcVPgoJMKTdao= 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 1696236697320584.6759912282361; Mon, 2 Oct 2023 01:51:37 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-663-6p7ZJajUMgW2uiEaq2HxKw-1; Mon, 02 Oct 2023 04:51:33 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 5E365101B040; Mon, 2 Oct 2023 08:51:31 +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 2B8F114171CA; Mon, 2 Oct 2023 08:51:31 +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 C7D2619466FB; Mon, 2 Oct 2023 08:51:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 394411946595 for ; Mon, 2 Oct 2023 08:51:29 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 29187C154CA; Mon, 2 Oct 2023 08:51:29 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.226.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B4D33C15BB8 for ; Mon, 2 Oct 2023 08:51:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696236696; 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=yky/SRTjW9fEqNqhe/VeKOmrFsS5gPFZtu3lv0MiLOQ=; b=fxQ4WLDPsok5pe2cjK16qvh8NaOy4or+lIlW3xCuJaOBkkh3K2YvMHJI3hGyV/wFCNxXJK Ci51OG6Jr5rNn8wV0uyBZgSFTUZ4O3jyJdKBiN8SlPa9T6/8sHhvxIscLyQ7CAwpGAPg6z GMwNtQGOKg7Njx2nLCPgF0oh7yIPfD8= X-MC-Unique: 6p7ZJajUMgW2uiEaq2HxKw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 01/11] systemd: libvirtd doesn't need @sockprefix@ Date: Mon, 2 Oct 2023 10:51:16 +0200 Message-ID: <20231002085126.210149-2-abologna@redhat.com> In-Reply-To: <20231002085126.210149-1-abologna@redhat.com> References: <20231002085126.210149-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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.7 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: 1696236698554100001 Content-Type: text/plain; charset="utf-8"; x-default="true" It uses custom templates which already hardcode the correct value. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik --- src/remote/meson.build | 1 - 1 file changed, 1 deletion(-) diff --git a/src/remote/meson.build b/src/remote/meson.build index e14541f09e..41c73360d1 100644 --- a/src/remote/meson.build +++ b/src/remote/meson.build @@ -192,7 +192,6 @@ if conf.has('WITH_REMOTE') 'service': 'libvirtd', 'service_in': files('libvirtd.service.in'), 'name': 'legacy monolithic', - 'sockprefix': 'libvirt', 'sockets': [ 'main', 'ro', 'admin', 'tcp', 'tls' ], 'socket_in': files('libvirtd.socket.in'), 'socket_ro_in': files('libvirtd-ro.socket.in'), --=20 2.41.0 From nobody Fri May 17 09:01:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1696236704; cv=none; d=zohomail.com; s=zohoarc; b=cATnD4ArDL8N4DnL/Z9/edD14kc3YbLpKoufnlIrg9Y2o7/WrMZX8ugxLkuEov1534dlOZG9RTKYIIMFLBa/DvPy5SgwZJpIwF/p+7SD9xQz6CXhqhQyksmCAGEQG1F9srciTjDx9HSLGPn1A1Q9ZHqt78cNYtZZf2y1ivf3dbg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696236704; 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=dA6ylHFoAJPvoy0WF2DM4GBruKo9sKzihm7jHTd1jXM=; b=kQwcGv/gsAlldLe8Tr1L0XWW3wPegLCyWGs/jEGpGkZXAbKRPft7ZF+5cmG5WW0Q3ExiFo2FTDJsOJ1SbxayQzr/CHfgwjM+lRzbdC8RE8n+jnf4gmpHqsP4gm1jKFwkrPbtH39jIJh8oLUOelPKX4+IwCFEc6s/eMUbxL4tnGo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1696236704638502.6305202129272; Mon, 2 Oct 2023 01:51:44 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-554-JeAm9h-YPNWGjJCp56sk2g-1; Mon, 02 Oct 2023 04:51:33 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (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 845408582A5; Mon, 2 Oct 2023 08:51:31 +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 6FF7DC154CC; Mon, 2 Oct 2023 08:51:31 +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 0598819465A2; Mon, 2 Oct 2023 08:51:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E2E4C1946A52 for ; Mon, 2 Oct 2023 08:51:29 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id D39B5C158BA; Mon, 2 Oct 2023 08:51:29 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.226.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6AFDFC15BB8 for ; Mon, 2 Oct 2023 08:51:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696236703; 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=dA6ylHFoAJPvoy0WF2DM4GBruKo9sKzihm7jHTd1jXM=; b=bKI8e+u0yQxkQEmVH6FlfiqgRp0CrgCAB9tEyv99CtTQVKpnHUmxhgbfzTHa88p6RtN4eT PDWFZaDjelmMTZ2tGZvq+iGHnyCZzVaHfIFGFpq57HB/tpYi6d+MKx0sUtvnow/y1dwLRA pb6M74eH47zVkRX2kSQpN2/SzONtTX0= X-MC-Unique: JeAm9h-YPNWGjJCp56sk2g-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 02/11] systemd: Support merging multiple units Date: Mon, 2 Oct 2023 10:51:17 +0200 Message-ID: <20231002085126.210149-3-abologna@redhat.com> In-Reply-To: <20231002085126.210149-1-abologna@redhat.com> References: <20231002085126.210149-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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.8 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: 1696236705877100011 Content-Type: text/plain; charset="utf-8"; x-default="true" In order to further deduplicate the contents of the various unit files, we need to be able to merge multiple additional units into the initial one. Luckily the merge logic is in no way constrained to working with just two units, so achieving this is pretty much just a matter of lifting the existing limitation on the number of arguments that the script accepts. As a special case, it's now also possible to call the script with just the base unit as argument. No merging will be performed in that case, obviously, but we'll still go through the basic validation and cleanup steps. This also fixes a bug in the check for the number of arguments: sys.argv also contains the name of the script, so we should have checked that its size was at least 3. The check is now written in a way that's less prone to misunderstandings. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik --- scripts/merge-systemd-units.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/merge-systemd-units.py b/scripts/merge-systemd-units.py index bc3321230d..30e8757544 100755 --- a/scripts/merge-systemd-units.py +++ b/scripts/merge-systemd-units.py @@ -82,13 +82,18 @@ def merge_units(base, extra): return merged =20 =20 -if len(sys.argv) < 2: - print("usage: {} BASE EXTRA".format(sys.argv[0])) +prog =3D sys.argv[0] +args =3D sys.argv[1:] + +if len(args) < 1: + print("usage: {} BASE [EXTRA]...".format(prog)) sys.exit(1) =20 -base =3D parse_unit(sys.argv[1]) -extra =3D parse_unit(sys.argv[2]) +merged =3D parse_unit(args[0]) + +for arg in args[1:]: + extra =3D parse_unit(arg) =20 -merged =3D merge_units(base, extra) + merged =3D merge_units(merged, extra) =20 sys.stdout.write(format_unit(merged)) --=20 2.41.0 From nobody Fri May 17 09:01:23 2024 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=1696236699; cv=none; d=zohomail.com; s=zohoarc; b=Fqrq0KOyRSoATdGe7bfgIvCN+ZNA6/O7B+PhA0Rmz1NPSRQlMAPMFwtdEkMX5BMes26FGkwTRDmBKEqJvIdEu7dMVFSru0SRHjNDf8v2t2mn4rGuyXiVn8zGUVG0sWGO6dAtc4cpyLdDolPph7ziR/sy0rqGRK3G30uXQkWEXBk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696236699; 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=SEbMjve/bAvs1OGlKYB7hg6sUanrhkIrbJTVoX8ewt0=; b=UWTmOzfk8D3MmxtrbzVmF/mRu8N3UTGTKSK18FSp0Z8SNONbYNYNpZzQ8MrZeGvu5P0oNSWyLCJjfi0dg62Z5AfkhAl/CCl7NopNAgMQVT6jEMZ7+bnrJpJcVYsWa6/zRez6HkFcYXQinKtR0NrKC7yQdT6G9QJdVyby9hV/5rw= 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 1696236699169450.19846280749584; Mon, 2 Oct 2023 01:51:39 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-675-1_Fni69yOoa2zAp6GK7bXg-1; Mon, 02 Oct 2023 04:51:35 -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 0A67B101B055; Mon, 2 Oct 2023 08:51:32 +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 E87BB2026D4B; Mon, 2 Oct 2023 08:51:31 +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 365E21946A6B; Mon, 2 Oct 2023 08:51:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 99EF41946595 for ; Mon, 2 Oct 2023 08:51:30 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 89164C158BA; Mon, 2 Oct 2023 08:51:30 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.226.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 206ADC15BB8 for ; Mon, 2 Oct 2023 08:51:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696236698; 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=SEbMjve/bAvs1OGlKYB7hg6sUanrhkIrbJTVoX8ewt0=; b=SeKHUieMpL2+/cY29ygBM+F5ej0NtzixnroKzAWhi5gBuk1d4UDony4sf0UczKPNONmFDT tInmXcq8REgqaALSikMtYeMj4yzqQThqhDRlQBprJfEEfcRZcWk51YlqCExExGIuln01y2 mnv8aHj8ui2XwE0s5KpsoqE4HRsrIDY= X-MC-Unique: 1_Fni69yOoa2zAp6GK7bXg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 03/11] systemd: Accept multiple files for service_extra_in/socket_extra_in Date: Mon, 2 Oct 2023 10:51:18 +0200 Message-ID: <20231002085126.210149-4-abologna@redhat.com> In-Reply-To: <20231002085126.210149-1-abologna@redhat.com> References: <20231002085126.210149-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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: 1696236701292100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Now that the underlying script is able to merge an arbitrary number of units into the base template, expose this possibility in the build system. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik --- src/ch/meson.build | 4 +++- src/libxl/meson.build | 8 ++++++-- src/lxc/meson.build | 4 +++- src/meson.build | 12 ++++++------ src/network/meson.build | 4 +++- src/qemu/meson.build | 4 +++- src/storage/meson.build | 4 +++- src/vbox/meson.build | 4 +++- src/vz/meson.build | 4 +++- 9 files changed, 33 insertions(+), 15 deletions(-) diff --git a/src/ch/meson.build b/src/ch/meson.build index df246ef9b0..7cee90d0da 100644 --- a/src/ch/meson.build +++ b/src/ch/meson.build @@ -58,7 +58,9 @@ if conf.has('WITH_CH') virt_daemon_units +=3D { 'service': 'virtchd', 'name': 'Cloud Hypervisor', - 'service_extra_in': files('virtchd.service.extra.in'), + 'service_extra_in': [ + files('virtchd.service.extra.in'), + ], } =20 virt_install_dirs +=3D [ diff --git a/src/libxl/meson.build b/src/libxl/meson.build index 8e6f455139..e75a8f2fdb 100644 --- a/src/libxl/meson.build +++ b/src/libxl/meson.build @@ -67,8 +67,12 @@ if conf.has('WITH_LIBXL') virt_daemon_units +=3D { 'service': 'virtxend', 'name': 'Xen', - 'service_extra_in': files('virtxend.service.extra.in'), - 'socket_extra_in': files('virtxend.socket.extra.in'), + 'service_extra_in': [ + files('virtxend.service.extra.in'), + ], + 'socket_extra_in': [ + files('virtxend.socket.extra.in'), + ], } =20 openrc_init_files +=3D { diff --git a/src/lxc/meson.build b/src/lxc/meson.build index 5eb23fbbbf..198e282e63 100644 --- a/src/lxc/meson.build +++ b/src/lxc/meson.build @@ -165,7 +165,9 @@ if conf.has('WITH_LXC') virt_daemon_units +=3D { 'service': 'virtlxcd', 'name': 'LXC', - 'service_extra_in': files('virtlxcd.service.extra.in'), + 'service_extra_in': [ + files('virtlxcd.service.extra.in'), + ], } =20 openrc_init_files +=3D { diff --git a/src/meson.build b/src/meson.build index 144f24e526..f3814d75ce 100644 --- a/src/meson.build +++ b/src/meson.build @@ -199,8 +199,8 @@ guest_unit_files =3D [] # * sockets - array of additional sockets (optional, default [ 'main', '= ro', 'admin' ]) # * service_in - service source file (optional, default virtd.service.in) # * socket_$name_in - additional socket source files (optional, default = virtd.socket.in or virtd-$name.socket.in) -# * service_extra_in - unit to merge with service_in (optional, default = None) -# * socket_extra_in - unit to merge with socket_$name_in (optional, defa= ult None) +# * service_extra_in - units to merge with service_in (optional, default= []) +# * socket_extra_in - units to merge with socket_$name_in (optional, def= ault []) virt_daemon_units =3D [] =20 # openrc_init_files @@ -824,9 +824,9 @@ if conf.has('WITH_LIBVIRTD') =20 if 'service_extra_in' in unit service_in =3D configure_file( - input: [ service_in, unit['service_extra_in'] ], + input: [ service_in ] + unit['service_extra_in'], output: '@0@.in'.format(service_out), - command: [ merge_systemd_units_prog, '@INPUT0@', '@INPUT1@' ], + command: [ merge_systemd_units_prog, '@INPUT@' ], capture: true, ) endif @@ -852,9 +852,9 @@ if conf.has('WITH_LIBVIRTD') =20 if 'socket_extra_in' in unit socket_in =3D configure_file( - input: [ socket_in, unit['socket_extra_in'] ], + input: [ socket_in ] + unit['socket_extra_in'], output: '@0@.in'.format(socket_out), - command: [ merge_systemd_units_prog, '@INPUT0@', '@INPUT1@' ], + command: [ merge_systemd_units_prog, '@INPUT@' ], capture: true, ) endif diff --git a/src/network/meson.build b/src/network/meson.build index d0383cca1c..3cf2ef3d3d 100644 --- a/src/network/meson.build +++ b/src/network/meson.build @@ -63,7 +63,9 @@ if conf.has('WITH_NETWORK') virt_daemon_units +=3D { 'service': 'virtnetworkd', 'name': 'network', - 'service_extra_in': files('virtnetworkd.service.extra.in'), + 'service_extra_in': [ + files('virtnetworkd.service.extra.in'), + ], } =20 openrc_init_files +=3D { diff --git a/src/qemu/meson.build b/src/qemu/meson.build index 64c62e584f..fff61ddf27 100644 --- a/src/qemu/meson.build +++ b/src/qemu/meson.build @@ -184,7 +184,9 @@ if conf.has('WITH_QEMU') virt_daemon_units +=3D { 'service': 'virtqemud', 'name': 'QEMU', - 'service_extra_in': files('virtqemud.service.extra.in'), + 'service_extra_in': [ + files('virtqemud.service.extra.in'), + ], } =20 openrc_init_files +=3D { diff --git a/src/storage/meson.build b/src/storage/meson.build index 023353c1d6..daad8abf25 100644 --- a/src/storage/meson.build +++ b/src/storage/meson.build @@ -112,7 +112,9 @@ if conf.has('WITH_STORAGE') virt_daemon_units +=3D { 'service': 'virtstoraged', 'name': 'storage', - 'service_extra_in': files('virtstoraged.service.extra.in'), + 'service_extra_in': [ + files('virtstoraged.service.extra.in'), + ], } =20 openrc_init_files +=3D { diff --git a/src/vbox/meson.build b/src/vbox/meson.build index a72c1833f1..e05f532e35 100644 --- a/src/vbox/meson.build +++ b/src/vbox/meson.build @@ -58,7 +58,9 @@ if conf.has('WITH_VBOX') virt_daemon_units +=3D { 'service': 'virtvboxd', 'name': 'VirtualBox', - 'service_extra_in': files('virtvboxd.service.extra.in'), + 'service_extra_in': [ + files('virtvboxd.service.extra.in'), + ], } =20 openrc_init_files +=3D { diff --git a/src/vz/meson.build b/src/vz/meson.build index ce2cbae454..bc5b5fb623 100644 --- a/src/vz/meson.build +++ b/src/vz/meson.build @@ -49,7 +49,9 @@ if conf.has('WITH_VZ') virt_daemon_units +=3D { 'service': 'virtvzd', 'name': 'vz', - 'service_extra_in': files('virtvzd.service.extra.in'), + 'service_extra_in': [ + files('virtvzd.service.extra.in'), + ], } =20 openrc_init_files +=3D { --=20 2.41.0 From nobody Fri May 17 09:01:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1696236701; cv=none; d=zohomail.com; s=zohoarc; b=Ce4q1mOFUFdLs+wlhDIcO7+qS7qI14A8VWnzb2aNi6t/wQMpiNJyc84pakBxliQwqVvQ7T0zEyueu4RXziM10HCguES54zNf192QHw3UsI3FKUJWnag7Eg+xS6pDQ4e4WGr939FNKUga1cxeDPq/KigmheVRCUatZ+exitlquZM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696236701; 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=uSZJdE7+/oYYyOLMZ8dmN/zDpJrN29kXwVfw4Wo0blQ=; b=Aw0eZCIM3EOc9UtyvruSt2XJKkovNCGuYqW88GZSbBFV4M9loDSgxNLRzkueghV/DyimD0OdD+B0ZzMTXc6D6Ylq205D9OYLoXxEPqNCEZov+ek91KOMTeCZ7PRYVdzqE3l5uU/gLqjvYc6h8WoTw43GrfP1LPFCmNPORgGU+bo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1696236701786436.71982209354076; Mon, 2 Oct 2023 01:51:41 -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-344-B2v1j5_jOi2_n1WCheZTdA-1; Mon, 02 Oct 2023 04:51:35 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (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 D74923816D88; Mon, 2 Oct 2023 08:51:32 +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 BFFD81054FC1; Mon, 2 Oct 2023 08:51:32 +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 67B631946597; Mon, 2 Oct 2023 08:51:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4C5BB1946A74 for ; Mon, 2 Oct 2023 08:51:31 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 3E8AAC03293; Mon, 2 Oct 2023 08:51:31 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.226.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CACC2C15BB8 for ; Mon, 2 Oct 2023 08:51:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696236700; 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=uSZJdE7+/oYYyOLMZ8dmN/zDpJrN29kXwVfw4Wo0blQ=; b=c/8ew4ODEhAreEw5DKQFx1NDJlU7gwt7+fbaBn/u31Y/JQO26Vmx+NdbQYylQiYSsPMWHL XHvLc7BlMN8s/potdca5H6nrTgFMp7IWKVkF7PY5NGRta/2inRjvnDZyA1IjrJiyH237NT nAelfhHV9iYrK4NR4J5LmYpmC1VMKZ8= X-MC-Unique: B2v1j5_jOi2_n1WCheZTdA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 04/11] systemd: Introduce systemd_service_limitnofile_extra Date: Mon, 2 Oct 2023 10:51:19 +0200 Message-ID: <20231002085126.210149-5-abologna@redhat.com> In-Reply-To: <20231002085126.210149-1-abologna@redhat.com> References: <20231002085126.210149-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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.3 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: 1696236702761100003 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik --- src/ch/meson.build | 1 + src/ch/virtchd.service.extra.in | 4 ---- src/locking/meson.build | 3 +++ src/locking/virtlockd.service.in | 4 ---- src/logging/meson.build | 3 +++ src/logging/virtlogd.service.in | 4 ---- src/lxc/meson.build | 1 + src/lxc/virtlxcd.service.extra.in | 4 ---- src/meson.build | 5 +++++ src/qemu/meson.build | 1 + src/qemu/virtqemud.service.extra.in | 4 ---- src/remote/libvirtd.service.in | 4 ---- src/remote/meson.build | 3 +++ src/virtd.service.limitnofile.extra.in | 5 +++++ 14 files changed, 22 insertions(+), 24 deletions(-) create mode 100644 src/virtd.service.limitnofile.extra.in diff --git a/src/ch/meson.build b/src/ch/meson.build index 7cee90d0da..0760d1f8e1 100644 --- a/src/ch/meson.build +++ b/src/ch/meson.build @@ -60,6 +60,7 @@ if conf.has('WITH_CH') 'name': 'Cloud Hypervisor', 'service_extra_in': [ files('virtchd.service.extra.in'), + systemd_service_limitnofile_extra_in, ], } =20 diff --git a/src/ch/virtchd.service.extra.in b/src/ch/virtchd.service.extra= .in index bc2fef57cc..626cf0a21b 100644 --- a/src/ch/virtchd.service.extra.in +++ b/src/ch/virtchd.service.extra.in @@ -5,10 +5,6 @@ After=3Dremote-fs.target =20 [Service] KillMode=3Dprocess -# Raise hard limits to match behaviour of systemd >=3D 240. -# During startup, daemon will set soft limit to match hard limit -# per systemd recommendations -LimitNOFILE=3D1024:524288 # The cgroups pids controller can limit the number of tasks started by # the daemon, which can limit the number of domains for some hypervisors. # A conservative default of 8 tasks per guest results in a TasksMax of diff --git a/src/locking/meson.build b/src/locking/meson.build index 6b3cd781d1..f3bdf57483 100644 --- a/src/locking/meson.build +++ b/src/locking/meson.build @@ -144,6 +144,9 @@ if conf.has('WITH_LIBVIRTD') virt_daemon_units +=3D { 'service': 'virtlockd', 'service_in': files('virtlockd.service.in'), + 'service_extra_in': [ + systemd_service_limitnofile_extra_in, + ], 'name': 'locking', 'sockets': [ 'main', 'admin' ], 'socket_in': files('virtlockd.socket.in'), diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.servi= ce.in index ce00b6def9..5c374fea8f 100644 --- a/src/locking/virtlockd.service.in +++ b/src/locking/virtlockd.service.in @@ -17,10 +17,6 @@ ExecReload=3D/bin/kill -USR1 $MAINPID # cause the machine to be fenced (rebooted), so make # sure we discourage OOM killer OOMScoreAdjust=3D-900 -# Raise hard limits to match behaviour of systemd >=3D 240. -# During startup, daemon will set soft limit to match hard limit -# per systemd recommendations -LimitNOFILE=3D1024:524288 =20 [Install] WantedBy=3Dmulti-user.target diff --git a/src/logging/meson.build b/src/logging/meson.build index 1527f91faf..a3d0ad297c 100644 --- a/src/logging/meson.build +++ b/src/logging/meson.build @@ -91,6 +91,9 @@ if conf.has('WITH_LIBVIRTD') virt_daemon_units +=3D { 'service': 'virtlogd', 'service_in': files('virtlogd.service.in'), + 'service_extra_in': [ + systemd_service_limitnofile_extra_in, + ], 'name': 'logging', 'sockets': [ 'main', 'admin' ], 'socket_in': files('virtlogd.socket.in'), diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service= .in index 52c9e5bb9e..9108dd1ff9 100644 --- a/src/logging/virtlogd.service.in +++ b/src/logging/virtlogd.service.in @@ -17,10 +17,6 @@ ExecReload=3D/bin/kill -USR1 $MAINPID # cause the machine to be fenced (rebooted), so make # sure we discourage OOM killer OOMScoreAdjust=3D-900 -# Raise hard limits to match behaviour of systemd >=3D 240. -# During startup, daemon will set soft limit to match hard limit -# per systemd recommendations -LimitNOFILE=3D1024:524288 =20 [Install] WantedBy=3Dmulti-user.target diff --git a/src/lxc/meson.build b/src/lxc/meson.build index 198e282e63..0c4d51d8b9 100644 --- a/src/lxc/meson.build +++ b/src/lxc/meson.build @@ -167,6 +167,7 @@ if conf.has('WITH_LXC') 'name': 'LXC', 'service_extra_in': [ files('virtlxcd.service.extra.in'), + systemd_service_limitnofile_extra_in, ], } =20 diff --git a/src/lxc/virtlxcd.service.extra.in b/src/lxc/virtlxcd.service.e= xtra.in index bc2fef57cc..626cf0a21b 100644 --- a/src/lxc/virtlxcd.service.extra.in +++ b/src/lxc/virtlxcd.service.extra.in @@ -5,10 +5,6 @@ After=3Dremote-fs.target =20 [Service] KillMode=3Dprocess -# Raise hard limits to match behaviour of systemd >=3D 240. -# During startup, daemon will set soft limit to match hard limit -# per systemd recommendations -LimitNOFILE=3D1024:524288 # The cgroups pids controller can limit the number of tasks started by # the daemon, which can limit the number of domains for some hypervisors. # A conservative default of 8 tasks per guest results in a TasksMax of diff --git a/src/meson.build b/src/meson.build index f3814d75ce..a9e6b521ee 100644 --- a/src/meson.build +++ b/src/meson.build @@ -191,6 +191,11 @@ virt_test_aug_dir =3D datadir / 'augeas' / 'lenses' / = 'tests' # guest unit files to install guest_unit_files =3D [] =20 +# systemd_*_extra_in: +# snippets that are shared by multiple units +# can be used in service_extra_in/socket_extra_in (see below) +systemd_service_limitnofile_extra_in =3D files('virtd.service.limitnofile.= extra.in') + # virt_daemon_units: # generate libvirt daemon systemd unit files # * service - name of the service (required) diff --git a/src/qemu/meson.build b/src/qemu/meson.build index fff61ddf27..09f79f52ee 100644 --- a/src/qemu/meson.build +++ b/src/qemu/meson.build @@ -186,6 +186,7 @@ if conf.has('WITH_QEMU') 'name': 'QEMU', 'service_extra_in': [ files('virtqemud.service.extra.in'), + systemd_service_limitnofile_extra_in, ], } =20 diff --git a/src/qemu/virtqemud.service.extra.in b/src/qemu/virtqemud.servi= ce.extra.in index 585e1e82eb..48b349b48a 100644 --- a/src/qemu/virtqemud.service.extra.in +++ b/src/qemu/virtqemud.service.extra.in @@ -9,10 +9,6 @@ After=3Dremote-fs.target =20 [Service] KillMode=3Dprocess -# Raise hard limits to match behaviour of systemd >=3D 240. -# During startup, daemon will set soft limit to match hard limit -# per systemd recommendations -LimitNOFILE=3D1024:524288 # The cgroups pids controller can limit the number of tasks started by # the daemon, which can limit the number of domains for some hypervisors. # A conservative default of 8 tasks per guest results in a TasksMax of diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in index 24a6712b75..8dc6df2138 100644 --- a/src/remote/libvirtd.service.in +++ b/src/remote/libvirtd.service.in @@ -33,10 +33,6 @@ ExecStart=3D@sbindir@/libvirtd $LIBVIRTD_ARGS ExecReload=3D/bin/kill -HUP $MAINPID KillMode=3Dprocess Restart=3Don-failure -# Raise hard limits to match behaviour of systemd >=3D 240. -# During startup, daemon will set soft limit to match hard limit -# per systemd recommendations -LimitNOFILE=3D1024:524288 # The cgroups pids controller can limit the number of tasks started by # the daemon, which can limit the number of domains for some hypervisors. # A conservative default of 8 tasks per guest results in a TasksMax of diff --git a/src/remote/meson.build b/src/remote/meson.build index 41c73360d1..e2960195f7 100644 --- a/src/remote/meson.build +++ b/src/remote/meson.build @@ -191,6 +191,9 @@ if conf.has('WITH_REMOTE') virt_daemon_units +=3D { 'service': 'libvirtd', 'service_in': files('libvirtd.service.in'), + 'service_extra_in': [ + systemd_service_limitnofile_extra_in, + ], 'name': 'legacy monolithic', 'sockets': [ 'main', 'ro', 'admin', 'tcp', 'tls' ], 'socket_in': files('libvirtd.socket.in'), diff --git a/src/virtd.service.limitnofile.extra.in b/src/virtd.service.lim= itnofile.extra.in new file mode 100644 index 0000000000..42c1960a7d --- /dev/null +++ b/src/virtd.service.limitnofile.extra.in @@ -0,0 +1,5 @@ +[Service] +# Raise hard limits to match behaviour of systemd >=3D 240. +# During startup, daemon will set soft limit to match hard limit +# per systemd recommendations +LimitNOFILE=3D1024:524288 --=20 2.41.0 From nobody Fri May 17 09:01:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1696236703; cv=none; d=zohomail.com; s=zohoarc; b=TQEcdoEiOaI5dNDRDeMwjOKzUynds5D1+knvxXs/E+PGRZ/bxClPJ02PzE3tjvUbzG/fKN11L85TSpV2kkhX7ZJK/S25pNyPIstU5qGO9Kg2sCi9NeI5fx+M6/O0BIFCbF2xtsTu6Jcu5Q+D6VTF/odCaAXM1+bonJRyjRK0xZ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696236703; 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=1zrOLiO86kxzRk8dvPxSgZwokZmuwR9ENKc+KPijl+w=; b=H87im/AaGEC+khhFMVLEzPLAxWVq1b+6GK/aw3tIP9Sy3XdmUgkPe5HlPG7V85z2qyQH62DdTpyI0e72uRhjMPopZBEGcJtSg7LVnBpLNAmobLEwYFj9ERDTSqDeABAsIJs1/yz876d4qJnuPtgektGu19edaByCmOnZkQULDo4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1696236703000254.34979443003806; Mon, 2 Oct 2023 01:51:43 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-438-kZHjkECwO6CNjQv_DMaMLw-1; Mon, 02 Oct 2023 04:51:38 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 4BB7C81DB71; Mon, 2 Oct 2023 08:51:33 +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 3648E40C6EC0; Mon, 2 Oct 2023 08:51:33 +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 BB1DC1946A5A; Mon, 2 Oct 2023 08:51:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1436A1946595 for ; Mon, 2 Oct 2023 08:51:32 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E972BC154CC; Mon, 2 Oct 2023 08:51:31 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.226.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 80934C154CA for ; Mon, 2 Oct 2023 08:51:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696236701; 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=1zrOLiO86kxzRk8dvPxSgZwokZmuwR9ENKc+KPijl+w=; b=GDe+KG5ryJ/NjNgmRDIHFoA+R8p6NjTZPefN3eboUgsJfpGVrcI0UW2/6/5Zxj2e83QJFW k2JM2cUUJn87jFrE/so+UdnSBhBFXHcpL2CxeTsZXqz2wkNwQyEN4adzTbuWgNLj4l34PJ DHrHWMU8obRKByBAt71UxCnkDjXMqd8= X-MC-Unique: kZHjkECwO6CNjQv_DMaMLw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 05/11] systemd: Introduce systemd_service_taskmax_extra Date: Mon, 2 Oct 2023 10:51:20 +0200 Message-ID: <20231002085126.210149-6-abologna@redhat.com> In-Reply-To: <20231002085126.210149-1-abologna@redhat.com> References: <20231002085126.210149-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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.2 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: 1696236704684100007 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik --- src/ch/meson.build | 1 + src/ch/virtchd.service.extra.in | 5 ----- src/lxc/meson.build | 1 + src/lxc/virtlxcd.service.extra.in | 5 ----- src/meson.build | 1 + src/qemu/meson.build | 1 + src/qemu/virtqemud.service.extra.in | 5 ----- src/remote/libvirtd.service.in | 5 ----- src/remote/meson.build | 1 + src/virtd.service.tasksmax.extra.in | 6 ++++++ 10 files changed, 11 insertions(+), 20 deletions(-) create mode 100644 src/virtd.service.tasksmax.extra.in diff --git a/src/ch/meson.build b/src/ch/meson.build index 0760d1f8e1..9eecf8c27f 100644 --- a/src/ch/meson.build +++ b/src/ch/meson.build @@ -61,6 +61,7 @@ if conf.has('WITH_CH') 'service_extra_in': [ files('virtchd.service.extra.in'), systemd_service_limitnofile_extra_in, + systemd_service_taskmax_extra_in, ], } =20 diff --git a/src/ch/virtchd.service.extra.in b/src/ch/virtchd.service.extra= .in index 626cf0a21b..38d820c1af 100644 --- a/src/ch/virtchd.service.extra.in +++ b/src/ch/virtchd.service.extra.in @@ -5,11 +5,6 @@ After=3Dremote-fs.target =20 [Service] KillMode=3Dprocess -# The cgroups pids controller can limit the number of tasks started by -# the daemon, which can limit the number of domains for some hypervisors. -# A conservative default of 8 tasks per guest results in a TasksMax of -# 32k to support 4096 guests. -TasksMax=3D32768 # With cgroups v2 there is no devices controller anymore, we have to use # eBPF to control access to devices. In order to do that we create a eBPF # hash MAP which locks memory. The default map size for 64 devices together diff --git a/src/lxc/meson.build b/src/lxc/meson.build index 0c4d51d8b9..fb1aedb5fc 100644 --- a/src/lxc/meson.build +++ b/src/lxc/meson.build @@ -168,6 +168,7 @@ if conf.has('WITH_LXC') 'service_extra_in': [ files('virtlxcd.service.extra.in'), systemd_service_limitnofile_extra_in, + systemd_service_taskmax_extra_in, ], } =20 diff --git a/src/lxc/virtlxcd.service.extra.in b/src/lxc/virtlxcd.service.e= xtra.in index 626cf0a21b..38d820c1af 100644 --- a/src/lxc/virtlxcd.service.extra.in +++ b/src/lxc/virtlxcd.service.extra.in @@ -5,11 +5,6 @@ After=3Dremote-fs.target =20 [Service] KillMode=3Dprocess -# The cgroups pids controller can limit the number of tasks started by -# the daemon, which can limit the number of domains for some hypervisors. -# A conservative default of 8 tasks per guest results in a TasksMax of -# 32k to support 4096 guests. -TasksMax=3D32768 # With cgroups v2 there is no devices controller anymore, we have to use # eBPF to control access to devices. In order to do that we create a eBPF # hash MAP which locks memory. The default map size for 64 devices together diff --git a/src/meson.build b/src/meson.build index a9e6b521ee..37239fd969 100644 --- a/src/meson.build +++ b/src/meson.build @@ -195,6 +195,7 @@ guest_unit_files =3D [] # snippets that are shared by multiple units # can be used in service_extra_in/socket_extra_in (see below) systemd_service_limitnofile_extra_in =3D files('virtd.service.limitnofile.= extra.in') +systemd_service_taskmax_extra_in =3D files('virtd.service.tasksmax.extra.i= n') =20 # virt_daemon_units: # generate libvirt daemon systemd unit files diff --git a/src/qemu/meson.build b/src/qemu/meson.build index 09f79f52ee..b28089aa06 100644 --- a/src/qemu/meson.build +++ b/src/qemu/meson.build @@ -187,6 +187,7 @@ if conf.has('WITH_QEMU') 'service_extra_in': [ files('virtqemud.service.extra.in'), systemd_service_limitnofile_extra_in, + systemd_service_taskmax_extra_in, ], } =20 diff --git a/src/qemu/virtqemud.service.extra.in b/src/qemu/virtqemud.servi= ce.extra.in index 48b349b48a..164f672c08 100644 --- a/src/qemu/virtqemud.service.extra.in +++ b/src/qemu/virtqemud.service.extra.in @@ -9,11 +9,6 @@ After=3Dremote-fs.target =20 [Service] KillMode=3Dprocess -# The cgroups pids controller can limit the number of tasks started by -# the daemon, which can limit the number of domains for some hypervisors. -# A conservative default of 8 tasks per guest results in a TasksMax of -# 32k to support 4096 guests. -TasksMax=3D32768 # With cgroups v2 there is no devices controller anymore, we have to use # eBPF to control access to devices. In order to do that we create a eBPF # hash MAP which locks memory. The default map size for 64 devices together diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in index 8dc6df2138..900b734f82 100644 --- a/src/remote/libvirtd.service.in +++ b/src/remote/libvirtd.service.in @@ -33,11 +33,6 @@ ExecStart=3D@sbindir@/libvirtd $LIBVIRTD_ARGS ExecReload=3D/bin/kill -HUP $MAINPID KillMode=3Dprocess Restart=3Don-failure -# The cgroups pids controller can limit the number of tasks started by -# the daemon, which can limit the number of domains for some hypervisors. -# A conservative default of 8 tasks per guest results in a TasksMax of -# 32k to support 4096 guests. -TasksMax=3D32768 # With cgroups v2 there is no devices controller anymore, we have to use # eBPF to control access to devices. In order to do that we create a eBPF # hash MAP which locks memory. The default map size for 64 devices togeth= er diff --git a/src/remote/meson.build b/src/remote/meson.build index e2960195f7..898131424f 100644 --- a/src/remote/meson.build +++ b/src/remote/meson.build @@ -193,6 +193,7 @@ if conf.has('WITH_REMOTE') 'service_in': files('libvirtd.service.in'), 'service_extra_in': [ systemd_service_limitnofile_extra_in, + systemd_service_taskmax_extra_in, ], 'name': 'legacy monolithic', 'sockets': [ 'main', 'ro', 'admin', 'tcp', 'tls' ], diff --git a/src/virtd.service.tasksmax.extra.in b/src/virtd.service.tasksm= ax.extra.in new file mode 100644 index 0000000000..2ea2939425 --- /dev/null +++ b/src/virtd.service.tasksmax.extra.in @@ -0,0 +1,6 @@ +[Service] +# The cgroups pids controller can limit the number of tasks started by +# the daemon, which can limit the number of domains for some hypervisors. +# A conservative default of 8 tasks per guest results in a TasksMax of +# 32k to support 4096 guests. +TasksMax=3D32768 --=20 2.41.0 From nobody Fri May 17 09:01:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1696236718; cv=none; d=zohomail.com; s=zohoarc; b=icq62SBXdbKEBv9porIZA8gvEzomacXfNMUj9vty0HUpIJjlmI+QjYJQdBP/NgQXVxmHYseoyOPgVqJrnAwD9zy5Q+YUS3nkfsc8dqSjzrkXmlupw5K6AeVwCyjkxZoOx9l5zQG9KKKEPuY/YNxZ4UKiAp+/TFlByTCOZwuCnsg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696236718; 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=TnQC3SnPLwXo/NSQQCvMHfZZ3Q957IfCp7A4jUk6q9M=; b=cmm7WyGIRBUTO3GY/5C6I8vZNBBM4R5HgWmx2uviun64obvMR3C3gV2XG57gS/pEhM75St+IJJuW2SRNi9rygQTFpeATVYxqIUGkoMaXeSUlKa3yXCTs1RgsAm81Dowjm4gCjLv2E1P+gCf94PvZAir+uw77Pgp4nDCJjtW0CYA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1696236718259235.21707272763024; Mon, 2 Oct 2023 01:51:58 -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-596-ZbKXjSF1MQGZS3-Hd_t1FA-1; Mon, 02 Oct 2023 04:51:38 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (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 3D2C11C294A8; Mon, 2 Oct 2023 08:51:34 +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 2677651E3; Mon, 2 Oct 2023 08:51:34 +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 F3BD71946597; Mon, 2 Oct 2023 08:51:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A9EFB1946A47 for ; Mon, 2 Oct 2023 08:51:32 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9DD5FC15BB8; Mon, 2 Oct 2023 08:51:32 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.226.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 361C6C154CA for ; Mon, 2 Oct 2023 08:51:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696236717; 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=TnQC3SnPLwXo/NSQQCvMHfZZ3Q957IfCp7A4jUk6q9M=; b=EEVwD4fGC6lhIEo+UdVze5MCVUJGGVjT3Cu3tNvZhNBREHWeGZG58xtscSnpAu6dx8ec+I KKE0F34SbgnRC+GeAZ/mVvKoWarAcrZTO11TGwr8U4SUlHSDM2fxHke1m/yUltavP4T5AZ zoMgd1G4OETkZfHea8rwU1cIIz75Paw= X-MC-Unique: ZbKXjSF1MQGZS3-Hd_t1FA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 06/11] systemd: Introduce systemd_service_limitmemlock_extra Date: Mon, 2 Oct 2023 10:51:21 +0200 Message-ID: <20231002085126.210149-7-abologna@redhat.com> In-Reply-To: <20231002085126.210149-1-abologna@redhat.com> References: <20231002085126.210149-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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.5 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: 1696236719070100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik --- src/ch/meson.build | 1 + src/ch/virtchd.service.extra.in | 6 ------ src/lxc/meson.build | 1 + src/lxc/virtlxcd.service.extra.in | 6 ------ src/meson.build | 1 + src/qemu/meson.build | 1 + src/qemu/virtqemud.service.extra.in | 6 ------ src/remote/libvirtd.service.in | 6 ------ src/remote/meson.build | 1 + ...service.extra.in =3D> virtd.service.limitmemlock.extra.in} | 6 ------ 10 files changed, 5 insertions(+), 30 deletions(-) copy src/{ch/virtchd.service.extra.in =3D> virtd.service.limitmemlock.extr= a.in} (75%) diff --git a/src/ch/meson.build b/src/ch/meson.build index 9eecf8c27f..29e76b6938 100644 --- a/src/ch/meson.build +++ b/src/ch/meson.build @@ -62,6 +62,7 @@ if conf.has('WITH_CH') files('virtchd.service.extra.in'), systemd_service_limitnofile_extra_in, systemd_service_taskmax_extra_in, + systemd_service_limitmemlock_extra_in, ], } =20 diff --git a/src/ch/virtchd.service.extra.in b/src/ch/virtchd.service.extra= .in index 38d820c1af..3655c51130 100644 --- a/src/ch/virtchd.service.extra.in +++ b/src/ch/virtchd.service.extra.in @@ -5,9 +5,3 @@ After=3Dremote-fs.target =20 [Service] KillMode=3Dprocess -# With cgroups v2 there is no devices controller anymore, we have to use -# eBPF to control access to devices. In order to do that we create a eBPF -# hash MAP which locks memory. The default map size for 64 devices together -# with program takes 12k per guest. After rounding up we will get 64M to -# support 4096 guests. -LimitMEMLOCK=3D64M diff --git a/src/lxc/meson.build b/src/lxc/meson.build index fb1aedb5fc..044a38c918 100644 --- a/src/lxc/meson.build +++ b/src/lxc/meson.build @@ -169,6 +169,7 @@ if conf.has('WITH_LXC') files('virtlxcd.service.extra.in'), systemd_service_limitnofile_extra_in, systemd_service_taskmax_extra_in, + systemd_service_limitmemlock_extra_in, ], } =20 diff --git a/src/lxc/virtlxcd.service.extra.in b/src/lxc/virtlxcd.service.e= xtra.in index 38d820c1af..3655c51130 100644 --- a/src/lxc/virtlxcd.service.extra.in +++ b/src/lxc/virtlxcd.service.extra.in @@ -5,9 +5,3 @@ After=3Dremote-fs.target =20 [Service] KillMode=3Dprocess -# With cgroups v2 there is no devices controller anymore, we have to use -# eBPF to control access to devices. In order to do that we create a eBPF -# hash MAP which locks memory. The default map size for 64 devices together -# with program takes 12k per guest. After rounding up we will get 64M to -# support 4096 guests. -LimitMEMLOCK=3D64M diff --git a/src/meson.build b/src/meson.build index 37239fd969..611f05583d 100644 --- a/src/meson.build +++ b/src/meson.build @@ -196,6 +196,7 @@ guest_unit_files =3D [] # can be used in service_extra_in/socket_extra_in (see below) systemd_service_limitnofile_extra_in =3D files('virtd.service.limitnofile.= extra.in') systemd_service_taskmax_extra_in =3D files('virtd.service.tasksmax.extra.i= n') +systemd_service_limitmemlock_extra_in =3D files('virtd.service.limitmemloc= k.extra.in') =20 # virt_daemon_units: # generate libvirt daemon systemd unit files diff --git a/src/qemu/meson.build b/src/qemu/meson.build index b28089aa06..167ed849ea 100644 --- a/src/qemu/meson.build +++ b/src/qemu/meson.build @@ -188,6 +188,7 @@ if conf.has('WITH_QEMU') files('virtqemud.service.extra.in'), systemd_service_limitnofile_extra_in, systemd_service_taskmax_extra_in, + systemd_service_limitmemlock_extra_in, ], } =20 diff --git a/src/qemu/virtqemud.service.extra.in b/src/qemu/virtqemud.servi= ce.extra.in index 164f672c08..32aba8be9c 100644 --- a/src/qemu/virtqemud.service.extra.in +++ b/src/qemu/virtqemud.service.extra.in @@ -9,12 +9,6 @@ After=3Dremote-fs.target =20 [Service] KillMode=3Dprocess -# With cgroups v2 there is no devices controller anymore, we have to use -# eBPF to control access to devices. In order to do that we create a eBPF -# hash MAP which locks memory. The default map size for 64 devices together -# with program takes 12k per guest. After rounding up we will get 64M to -# support 4096 guests. -LimitMEMLOCK=3D64M =20 [Install] Also=3Dvirtlogd.socket diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in index 900b734f82..250b4a6fc3 100644 --- a/src/remote/libvirtd.service.in +++ b/src/remote/libvirtd.service.in @@ -33,12 +33,6 @@ ExecStart=3D@sbindir@/libvirtd $LIBVIRTD_ARGS ExecReload=3D/bin/kill -HUP $MAINPID KillMode=3Dprocess Restart=3Don-failure -# With cgroups v2 there is no devices controller anymore, we have to use -# eBPF to control access to devices. In order to do that we create a eBPF -# hash MAP which locks memory. The default map size for 64 devices togeth= er -# with program takes 12k per guest. After rounding up we will get 64M to -# support 4096 guests. -LimitMEMLOCK=3D64M =20 [Install] WantedBy=3Dmulti-user.target diff --git a/src/remote/meson.build b/src/remote/meson.build index 898131424f..8b81a813f2 100644 --- a/src/remote/meson.build +++ b/src/remote/meson.build @@ -194,6 +194,7 @@ if conf.has('WITH_REMOTE') 'service_extra_in': [ systemd_service_limitnofile_extra_in, systemd_service_taskmax_extra_in, + systemd_service_limitmemlock_extra_in, ], 'name': 'legacy monolithic', 'sockets': [ 'main', 'ro', 'admin', 'tcp', 'tls' ], diff --git a/src/ch/virtchd.service.extra.in b/src/virtd.service.limitmemlo= ck.extra.in similarity index 75% copy from src/ch/virtchd.service.extra.in copy to src/virtd.service.limitmemlock.extra.in index 38d820c1af..3534b5ea48 100644 --- a/src/ch/virtchd.service.extra.in +++ b/src/virtd.service.limitmemlock.extra.in @@ -1,10 +1,4 @@ -[Unit] -Wants=3Dsystemd-machined.service -After=3Dsystemd-machined.service -After=3Dremote-fs.target - [Service] -KillMode=3Dprocess # With cgroups v2 there is no devices controller anymore, we have to use # eBPF to control access to devices. In order to do that we create a eBPF # hash MAP which locks memory. The default map size for 64 devices together --=20 2.41.0 From nobody Fri May 17 09:01:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1696236703; cv=none; d=zohomail.com; s=zohoarc; b=CWdJEhCl4y8GjpY/Az1oXWKzVfKyL2IkR44DXPY7PorAbEixJFjCjNovloSqEBKRmXRen5aYUPhgGc/37IKm+A1LfI0CqeJCvwgBjox60ActWMFkAQzLfLpBEylWZnKwN9axdR1VriwPLuZ7cb2sl0m7fiRf/YSZVNc5PYNfENs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696236703; 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=5sxmDyV07wYKa89QNQqywMDZ+mDpDeU6kn9hbyAWKMI=; b=XekYBQZkani0iHUA0WrnNxZKlNuPQcTRT69+TdTD4Ggc6E0OEnZzQsRl1IxIf75FoKALRfDruPwKNC4she32PopLuIccN5r6KG61Qfk5DPnMcZpof43wa+djpQKYmCVg5Y4lxe7iiQlawNWQE/x9DPmUWc8VdygUvaAJNO5cjWw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 169623670303151.88428818611544; Mon, 2 Oct 2023 01:51:43 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-604-5zIRZ6-RMcebOG3p8Eg7gg-1; Mon, 02 Oct 2023 04:51:39 -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 531BB811E86; Mon, 2 Oct 2023 08:51:35 +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 3F2382026D4B; Mon, 2 Oct 2023 08:51:35 +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 2FAC31946597; Mon, 2 Oct 2023 08:51:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6654C19465A3 for ; Mon, 2 Oct 2023 08:51:33 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 534E7C158BA; Mon, 2 Oct 2023 08:51:33 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.226.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DFE79C154CA for ; Mon, 2 Oct 2023 08:51:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696236702; 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=5sxmDyV07wYKa89QNQqywMDZ+mDpDeU6kn9hbyAWKMI=; b=G/IWndlPFJl8+0KTfWJV10qfXipzb+GrGxpwUPOmq2HTEN2pql0jcS82oPWhnbamJ3bJa/ BbvQCokBIGvLahWG0fnk/FFobajvs26y5XAJMXlLYgXwKpMSHWy+gsV8/V6jSlZEoOdexB fjEYx2dZP7qZh/Gs7bHMihIf4NsJ0lo= X-MC-Unique: 5zIRZ6-RMcebOG3p8Eg7gg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 07/11] systemd: Introduce systemd_service_oomscoreadjust_extra Date: Mon, 2 Oct 2023 10:51:22 +0200 Message-ID: <20231002085126.210149-8-abologna@redhat.com> In-Reply-To: <20231002085126.210149-1-abologna@redhat.com> References: <20231002085126.210149-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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: 1696236704802100009 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik --- src/locking/meson.build | 1 + src/locking/virtlockd.service.in | 4 ---- src/logging/meson.build | 1 + src/logging/virtlogd.service.in | 4 ---- src/meson.build | 1 + src/virtd.service.oomscoreadjust.extra.in | 5 +++++ 6 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 src/virtd.service.oomscoreadjust.extra.in diff --git a/src/locking/meson.build b/src/locking/meson.build index f3bdf57483..d15e2cb84a 100644 --- a/src/locking/meson.build +++ b/src/locking/meson.build @@ -145,6 +145,7 @@ if conf.has('WITH_LIBVIRTD') 'service': 'virtlockd', 'service_in': files('virtlockd.service.in'), 'service_extra_in': [ + systemd_service_oomscoreadjust_extra_in, systemd_service_limitnofile_extra_in, ], 'name': 'locking', diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.servi= ce.in index 5c374fea8f..cd6c77c6af 100644 --- a/src/locking/virtlockd.service.in +++ b/src/locking/virtlockd.service.in @@ -13,10 +13,6 @@ Environment=3DVIRTLOCKD_ARGS=3D EnvironmentFile=3D-@initconfdir@/virtlockd ExecStart=3D@sbindir@/virtlockd $VIRTLOCKD_ARGS ExecReload=3D/bin/kill -USR1 $MAINPID -# Losing the locks is a really bad thing that will -# cause the machine to be fenced (rebooted), so make -# sure we discourage OOM killer -OOMScoreAdjust=3D-900 =20 [Install] WantedBy=3Dmulti-user.target diff --git a/src/logging/meson.build b/src/logging/meson.build index a3d0ad297c..fbf492b16e 100644 --- a/src/logging/meson.build +++ b/src/logging/meson.build @@ -92,6 +92,7 @@ if conf.has('WITH_LIBVIRTD') 'service': 'virtlogd', 'service_in': files('virtlogd.service.in'), 'service_extra_in': [ + systemd_service_oomscoreadjust_extra_in, systemd_service_limitnofile_extra_in, ], 'name': 'logging', diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service= .in index 9108dd1ff9..569c9f88ad 100644 --- a/src/logging/virtlogd.service.in +++ b/src/logging/virtlogd.service.in @@ -13,10 +13,6 @@ Environment=3DVIRTLOGD_ARGS=3D EnvironmentFile=3D-@initconfdir@/virtlogd ExecStart=3D@sbindir@/virtlogd $VIRTLOGD_ARGS ExecReload=3D/bin/kill -USR1 $MAINPID -# Losing the logs is a really bad thing that will -# cause the machine to be fenced (rebooted), so make -# sure we discourage OOM killer -OOMScoreAdjust=3D-900 =20 [Install] WantedBy=3Dmulti-user.target diff --git a/src/meson.build b/src/meson.build index 611f05583d..29c37a030a 100644 --- a/src/meson.build +++ b/src/meson.build @@ -197,6 +197,7 @@ guest_unit_files =3D [] systemd_service_limitnofile_extra_in =3D files('virtd.service.limitnofile.= extra.in') systemd_service_taskmax_extra_in =3D files('virtd.service.tasksmax.extra.i= n') systemd_service_limitmemlock_extra_in =3D files('virtd.service.limitmemloc= k.extra.in') +systemd_service_oomscoreadjust_extra_in =3D files('virtd.service.oomscorea= djust.extra.in') =20 # virt_daemon_units: # generate libvirt daemon systemd unit files diff --git a/src/virtd.service.oomscoreadjust.extra.in b/src/virtd.service.= oomscoreadjust.extra.in new file mode 100644 index 0000000000..53b93efda8 --- /dev/null +++ b/src/virtd.service.oomscoreadjust.extra.in @@ -0,0 +1,5 @@ +[Service] +# Losing this daemon is a really bad thing that will +# cause the machine to be fenced (rebooted), so make +# sure we discourage OOM killer +OOMScoreAdjust=3D-900 --=20 2.41.0 From nobody Fri May 17 09:01:23 2024 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=1696236707; cv=none; d=zohomail.com; s=zohoarc; b=epWiCFQXxqACUrx8/kRvAfPBd1dlFLdExy9D86W0a6Ovr3zRbNPJMjTPxJW8Zav4YLZ2kYbw+BaBGfGb4zSL+oDS35sb9H8yjXoD0HIYA4EE12A6By3Dd0431dzTht1ysAZJbEeyXxkyV5HopYLN5/xTT4agbkaA/RHDRLSIHDs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696236707; 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=sh1xIv/OoKs3Eg2diqQoWfJaqOzgCqsLWcSrj9nrStw=; b=aMxGKSv2X1Hq0bzX84fe8W35Li78nIF/yUe0XP/BPacHRmvyOEP3jZVkDQIHEsgm9dYvGx+OdrhS0UP+YY6GScJX0gdefAAPkeERXsZ4RFW1hQBxXe3qXskubGgTWroDums77EyBRhVqk/rQhzEGo+x/7R9etkE049+AhKAd8VM= 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 1696236707379712.5649902154267; Mon, 2 Oct 2023 01:51:47 -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-37-R94Nkt4cNw2nDDDzbzKnLA-1; Mon, 02 Oct 2023 04:51:39 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 B07321C294C6; Mon, 2 Oct 2023 08:51:35 +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 976B014171CA; Mon, 2 Oct 2023 08:51:35 +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 62A0E19466F5; Mon, 2 Oct 2023 08:51:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 190A319466E8 for ; Mon, 2 Oct 2023 08:51:34 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0C5F9C15BB8; Mon, 2 Oct 2023 08:51:34 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.226.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 981B5C154CA for ; Mon, 2 Oct 2023 08:51:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696236706; 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=sh1xIv/OoKs3Eg2diqQoWfJaqOzgCqsLWcSrj9nrStw=; b=YHfE9abSVNfzrYy6QyPkC3M2NmGqAH4lzlDuZRgkic/yq89wbG1o2I18fWYVgCOEU5fgzy +wEu7DmCUngppNMYIik+fr3/XUDwPBQLVa4KMYxXwbVGMwD5lr6DHMFrBdye7dDP7NCBqL 8t7+gFgDJZ0rY12NJFKnV58b1mIz0D8= X-MC-Unique: R94Nkt4cNw2nDDDzbzKnLA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 08/11] systemd: Allow comments at the top of units Date: Mon, 2 Oct 2023 10:51:23 +0200 Message-ID: <20231002085126.210149-9-abologna@redhat.com> In-Reply-To: <20231002085126.210149-1-abologna@redhat.com> References: <20231002085126.210149-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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.7 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: 1696236709603100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Currently the script will reject any type of contents outside of a section, but we want to be able to have some useful comments at the top of each file to help users understand how they are processed. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik --- scripts/merge-systemd-units.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/merge-systemd-units.py b/scripts/merge-systemd-units.py index 30e8757544..869d857f1d 100755 --- a/scripts/merge-systemd-units.py +++ b/scripts/merge-systemd-units.py @@ -24,6 +24,11 @@ def parse_unit(unit_path): if line =3D=3D "": continue =20 + # Comments at the very top of the file, outside of any + # section, are allowed and will not show up in the output + if line[0] =3D=3D "#" and current_section =3D=3D "[Invalid]": + continue + if line[0] =3D=3D "[" and line[-1] =3D=3D "]": if line not in SECTIONS: print("Unknown section {}".format(line)) --=20 2.41.0 From nobody Fri May 17 09:01:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1696236702; cv=none; d=zohomail.com; s=zohoarc; b=KA6Ck1aURB7gfAopg/b8W+iYdJGsOaWYruYzg4SJKehW0rmcZrqKB+ZY96R6lGNjbQCRL2WXsl3DsO18Vrye9FNK1eOJCtqcfhJSVpXYprJ7IYAPzqrUOp2BH6/HGDwzjIwx4+0mTW9AFUI4fjVbsKGJMEhvfMHIfmKMM89Fji8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696236702; 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=g7LHE9ZzTcH7QQDpqdujcdaJe7EdfAOumf4VmuIRChc=; b=lBFfDPPFuHV/NNPCBETA+X09jumGhoPI6R5HMQcHuPBu/c+kVvGtwy5Zp6frH9Ismu7zf6tVNcOadzOkIW8ewCtz3bfYp2WLJD8J14+nraE+wBeEa7y0Qu3LKiEmRRgZ/hpqzHYxTC8id/vkmRGSgpA6KqMDuBkzFJI21LCmHIE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1696236702675555.7261526185132; Mon, 2 Oct 2023 01:51:42 -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-86-pvkJmkBkNKmhIFwePY8SDg-1; Mon, 02 Oct 2023 04:51:38 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 1422529ABA2F; Mon, 2 Oct 2023 08:51:36 +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 F02A740C2064; Mon, 2 Oct 2023 08:51:35 +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 91E0D19465B2; Mon, 2 Oct 2023 08:51:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E5DE11946595 for ; Mon, 2 Oct 2023 08:51:34 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id D84B9C154CC; Mon, 2 Oct 2023 08:51:34 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.226.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4F641C154CB for ; Mon, 2 Oct 2023 08:51:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696236701; 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=g7LHE9ZzTcH7QQDpqdujcdaJe7EdfAOumf4VmuIRChc=; b=KPWK11OPNuq8Af6n7I17F/ZFn3Ntbuz4So0uFVAXjxcTZ3Ts5d3yxSjOttavAoqhkbRNEk SScwUkPyLoM4SWLDHsgG+QuG43MjqnV5MAp73YV40p06KWbhmlYW4lQ8OQBPxxPDa/e7Pz Alwtq6CH8UlibBpeznUSDe0sYh560Wk= X-MC-Unique: pvkJmkBkNKmhIFwePY8SDg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 09/11] systemd: Set service_extra_in/socket_extra_in everywhere Date: Mon, 2 Oct 2023 10:51:24 +0200 Message-ID: <20231002085126.210149-10-abologna@redhat.com> In-Reply-To: <20231002085126.210149-1-abologna@redhat.com> References: <20231002085126.210149-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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.1 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: 1696236703874100005 Content-Type: text/plain; charset="utf-8"; x-default="true" It's somewhat confusing that some of the services have a corresponding foo.service.extra.in and foo.socket.extra.in, some have just one of the two, and some have neither. In order to make things more approachable, make sure that both files exists for each service. In most cases the extra units are currently unused, so they will just contain a comment briefly explaining their purpose and pointing users to meson.build, where they can find more information. The same comment is also added to the top of extra units that already have some contents in them for consistency. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik --- src/ch/meson.build | 3 +++ src/ch/virtchd.service.extra.in | 3 +++ src/ch/virtchd.socket.extra.in | 2 ++ src/interface/meson.build | 6 ++++++ src/interface/virtinterfaced.service.extra.in | 2 ++ src/interface/virtinterfaced.socket.extra.in | 2 ++ src/libxl/virtxend.service.extra.in | 3 +++ src/libxl/virtxend.socket.extra.in | 3 +++ src/locking/meson.build | 4 ++++ src/locking/virtlockd.service.extra.in | 2 ++ src/locking/virtlockd.socket.extra.in | 2 ++ src/logging/meson.build | 4 ++++ src/logging/virtlogd.service.extra.in | 2 ++ src/logging/virtlogd.socket.extra.in | 2 ++ src/lxc/meson.build | 3 +++ src/lxc/virtlxcd.service.extra.in | 3 +++ src/lxc/virtlxcd.socket.extra.in | 2 ++ src/network/meson.build | 3 +++ src/network/virtnetworkd.service.extra.in | 3 +++ src/network/virtnetworkd.socket.extra.in | 2 ++ src/node_device/meson.build | 6 ++++++ src/node_device/virtnodedevd.service.extra.in | 2 ++ src/node_device/virtnodedevd.socket.extra.in | 2 ++ src/nwfilter/meson.build | 6 ++++++ src/nwfilter/virtnwfilterd.service.extra.in | 2 ++ src/nwfilter/virtnwfilterd.socket.extra.in | 2 ++ src/qemu/meson.build | 3 +++ src/qemu/virtqemud.service.extra.in | 3 +++ src/qemu/virtqemud.socket.extra.in | 2 ++ src/remote/libvirtd.service.extra.in | 2 ++ src/remote/libvirtd.socket.extra.in | 2 ++ src/remote/meson.build | 10 ++++++++++ src/remote/virtproxyd.service.extra.in | 2 ++ src/remote/virtproxyd.socket.extra.in | 2 ++ src/secret/meson.build | 6 ++++++ src/secret/virtsecretd.service.extra.in | 2 ++ src/secret/virtsecretd.socket.extra.in | 2 ++ src/storage/meson.build | 3 +++ src/storage/virtstoraged.service.extra.in | 3 +++ src/storage/virtstoraged.socket.extra.in | 2 ++ src/vbox/meson.build | 3 +++ src/vbox/virtvboxd.service.extra.in | 3 +++ src/vbox/virtvboxd.socket.extra.in | 2 ++ src/vz/meson.build | 3 +++ src/vz/virtvzd.service.extra.in | 3 +++ src/vz/virtvzd.socket.extra.in | 2 ++ 46 files changed, 136 insertions(+) create mode 100644 src/ch/virtchd.socket.extra.in create mode 100644 src/interface/virtinterfaced.service.extra.in create mode 100644 src/interface/virtinterfaced.socket.extra.in create mode 100644 src/locking/virtlockd.service.extra.in create mode 100644 src/locking/virtlockd.socket.extra.in create mode 100644 src/logging/virtlogd.service.extra.in create mode 100644 src/logging/virtlogd.socket.extra.in create mode 100644 src/lxc/virtlxcd.socket.extra.in create mode 100644 src/network/virtnetworkd.socket.extra.in create mode 100644 src/node_device/virtnodedevd.service.extra.in create mode 100644 src/node_device/virtnodedevd.socket.extra.in create mode 100644 src/nwfilter/virtnwfilterd.service.extra.in create mode 100644 src/nwfilter/virtnwfilterd.socket.extra.in create mode 100644 src/qemu/virtqemud.socket.extra.in create mode 100644 src/remote/libvirtd.service.extra.in create mode 100644 src/remote/libvirtd.socket.extra.in create mode 100644 src/remote/virtproxyd.service.extra.in create mode 100644 src/remote/virtproxyd.socket.extra.in create mode 100644 src/secret/virtsecretd.service.extra.in create mode 100644 src/secret/virtsecretd.socket.extra.in create mode 100644 src/storage/virtstoraged.socket.extra.in create mode 100644 src/vbox/virtvboxd.socket.extra.in create mode 100644 src/vz/virtvzd.socket.extra.in diff --git a/src/ch/meson.build b/src/ch/meson.build index 29e76b6938..335b10ffaf 100644 --- a/src/ch/meson.build +++ b/src/ch/meson.build @@ -64,6 +64,9 @@ if conf.has('WITH_CH') systemd_service_taskmax_extra_in, systemd_service_limitmemlock_extra_in, ], + 'socket_extra_in': [ + files('virtchd.socket.extra.in'), + ], } =20 virt_install_dirs +=3D [ diff --git a/src/ch/virtchd.service.extra.in b/src/ch/virtchd.service.extra= .in index 3655c51130..8a3bc5b34d 100644 --- a/src/ch/virtchd.service.extra.in +++ b/src/ch/virtchd.service.extra.in @@ -1,3 +1,6 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. + [Unit] Wants=3Dsystemd-machined.service After=3Dsystemd-machined.service diff --git a/src/ch/virtchd.socket.extra.in b/src/ch/virtchd.socket.extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/ch/virtchd.socket.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/interface/meson.build b/src/interface/meson.build index b1617d83e6..3d2991315e 100644 --- a/src/interface/meson.build +++ b/src/interface/meson.build @@ -45,6 +45,12 @@ if conf.has('WITH_INTERFACE') virt_daemon_units +=3D { 'service': 'virtinterfaced', 'name': 'interface', + 'service_extra_in': [ + files('virtinterfaced.service.extra.in'), + ], + 'socket_extra_in': [ + files('virtinterfaced.socket.extra.in'), + ], } =20 openrc_init_files +=3D { diff --git a/src/interface/virtinterfaced.service.extra.in b/src/interface/= virtinterfaced.service.extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/interface/virtinterfaced.service.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/interface/virtinterfaced.socket.extra.in b/src/interface/v= irtinterfaced.socket.extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/interface/virtinterfaced.socket.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/libxl/virtxend.service.extra.in b/src/libxl/virtxend.servi= ce.extra.in index 55783aa3d5..b367a1db4c 100644 --- a/src/libxl/virtxend.service.extra.in +++ b/src/libxl/virtxend.service.extra.in @@ -1,3 +1,6 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. + [Unit] Wants=3Dvirtlockd.socket After=3Dvirtlockd.socket diff --git a/src/libxl/virtxend.socket.extra.in b/src/libxl/virtxend.socket= .extra.in index c8322efbbc..fc73809a0e 100644 --- a/src/libxl/virtxend.socket.extra.in +++ b/src/libxl/virtxend.socket.extra.in @@ -1,2 +1,5 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. + [Unit] ConditionPathExists=3D/proc/xen/capabilities diff --git a/src/locking/meson.build b/src/locking/meson.build index d15e2cb84a..71e628de04 100644 --- a/src/locking/meson.build +++ b/src/locking/meson.build @@ -145,6 +145,7 @@ if conf.has('WITH_LIBVIRTD') 'service': 'virtlockd', 'service_in': files('virtlockd.service.in'), 'service_extra_in': [ + files('virtlockd.service.extra.in'), systemd_service_oomscoreadjust_extra_in, systemd_service_limitnofile_extra_in, ], @@ -152,6 +153,9 @@ if conf.has('WITH_LIBVIRTD') 'sockets': [ 'main', 'admin' ], 'socket_in': files('virtlockd.socket.in'), 'socket_admin_in': files('virtlockd-admin.socket.in'), + 'socket_extra_in': [ + files('virtlockd.socket.extra.in'), + ], } =20 openrc_init_files +=3D { diff --git a/src/locking/virtlockd.service.extra.in b/src/locking/virtlockd= .service.extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/locking/virtlockd.service.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/locking/virtlockd.socket.extra.in b/src/locking/virtlockd.= socket.extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/locking/virtlockd.socket.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/logging/meson.build b/src/logging/meson.build index fbf492b16e..f538a663fb 100644 --- a/src/logging/meson.build +++ b/src/logging/meson.build @@ -92,6 +92,7 @@ if conf.has('WITH_LIBVIRTD') 'service': 'virtlogd', 'service_in': files('virtlogd.service.in'), 'service_extra_in': [ + files('virtlogd.service.extra.in'), systemd_service_oomscoreadjust_extra_in, systemd_service_limitnofile_extra_in, ], @@ -99,6 +100,9 @@ if conf.has('WITH_LIBVIRTD') 'sockets': [ 'main', 'admin' ], 'socket_in': files('virtlogd.socket.in'), 'socket_admin_in': files('virtlogd-admin.socket.in'), + 'socket_extra_in': [ + files('virtlogd.socket.extra.in'), + ], } =20 openrc_init_files +=3D { diff --git a/src/logging/virtlogd.service.extra.in b/src/logging/virtlogd.s= ervice.extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/logging/virtlogd.service.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/logging/virtlogd.socket.extra.in b/src/logging/virtlogd.so= cket.extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/logging/virtlogd.socket.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/lxc/meson.build b/src/lxc/meson.build index 044a38c918..666c6c1311 100644 --- a/src/lxc/meson.build +++ b/src/lxc/meson.build @@ -171,6 +171,9 @@ if conf.has('WITH_LXC') systemd_service_taskmax_extra_in, systemd_service_limitmemlock_extra_in, ], + 'socket_extra_in': [ + files('virtlxcd.socket.extra.in'), + ], } =20 openrc_init_files +=3D { diff --git a/src/lxc/virtlxcd.service.extra.in b/src/lxc/virtlxcd.service.e= xtra.in index 3655c51130..8a3bc5b34d 100644 --- a/src/lxc/virtlxcd.service.extra.in +++ b/src/lxc/virtlxcd.service.extra.in @@ -1,3 +1,6 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. + [Unit] Wants=3Dsystemd-machined.service After=3Dsystemd-machined.service diff --git a/src/lxc/virtlxcd.socket.extra.in b/src/lxc/virtlxcd.socket.ext= ra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/lxc/virtlxcd.socket.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/network/meson.build b/src/network/meson.build index 3cf2ef3d3d..eb171ae779 100644 --- a/src/network/meson.build +++ b/src/network/meson.build @@ -66,6 +66,9 @@ if conf.has('WITH_NETWORK') 'service_extra_in': [ files('virtnetworkd.service.extra.in'), ], + 'socket_extra_in': [ + files('virtnetworkd.socket.extra.in'), + ], } =20 openrc_init_files +=3D { diff --git a/src/network/virtnetworkd.service.extra.in b/src/network/virtne= tworkd.service.extra.in index 9fcabf652d..546709b7f4 100644 --- a/src/network/virtnetworkd.service.extra.in +++ b/src/network/virtnetworkd.service.extra.in @@ -1,2 +1,5 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. + [Service] KillMode=3Dprocess diff --git a/src/network/virtnetworkd.socket.extra.in b/src/network/virtnet= workd.socket.extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/network/virtnetworkd.socket.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/node_device/meson.build b/src/node_device/meson.build index d1e349bc5e..d66c02a0e2 100644 --- a/src/node_device/meson.build +++ b/src/node_device/meson.build @@ -53,6 +53,12 @@ if conf.has('WITH_NODE_DEVICES') virt_daemon_units +=3D { 'service': 'virtnodedevd', 'name': 'nodedev', + 'service_extra_in': [ + files('virtnodedevd.service.extra.in'), + ], + 'socket_extra_in': [ + files('virtnodedevd.socket.extra.in'), + ], } =20 openrc_init_files +=3D { diff --git a/src/node_device/virtnodedevd.service.extra.in b/src/node_devic= e/virtnodedevd.service.extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/node_device/virtnodedevd.service.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/node_device/virtnodedevd.socket.extra.in b/src/node_device= /virtnodedevd.socket.extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/node_device/virtnodedevd.socket.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/nwfilter/meson.build b/src/nwfilter/meson.build index 1b914f2360..de3d202267 100644 --- a/src/nwfilter/meson.build +++ b/src/nwfilter/meson.build @@ -51,6 +51,12 @@ if conf.has('WITH_NWFILTER') virt_daemon_units +=3D { 'service': 'virtnwfilterd', 'name': 'nwfilter', + 'service_extra_in': [ + files('virtnwfilterd.service.extra.in'), + ], + 'socket_extra_in': [ + files('virtnwfilterd.socket.extra.in'), + ], } =20 openrc_init_files +=3D { diff --git a/src/nwfilter/virtnwfilterd.service.extra.in b/src/nwfilter/vir= tnwfilterd.service.extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/nwfilter/virtnwfilterd.service.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/nwfilter/virtnwfilterd.socket.extra.in b/src/nwfilter/virt= nwfilterd.socket.extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/nwfilter/virtnwfilterd.socket.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/qemu/meson.build b/src/qemu/meson.build index 167ed849ea..b73c8be0d1 100644 --- a/src/qemu/meson.build +++ b/src/qemu/meson.build @@ -190,6 +190,9 @@ if conf.has('WITH_QEMU') systemd_service_taskmax_extra_in, systemd_service_limitmemlock_extra_in, ], + 'socket_extra_in': [ + files('virtqemud.socket.extra.in'), + ], } =20 openrc_init_files +=3D { diff --git a/src/qemu/virtqemud.service.extra.in b/src/qemu/virtqemud.servi= ce.extra.in index 32aba8be9c..cc16b6a9bb 100644 --- a/src/qemu/virtqemud.service.extra.in +++ b/src/qemu/virtqemud.service.extra.in @@ -1,3 +1,6 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. + [Unit] Requires=3Dvirtlogd.socket Wants=3Dvirtlockd.socket diff --git a/src/qemu/virtqemud.socket.extra.in b/src/qemu/virtqemud.socket= .extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/qemu/virtqemud.socket.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/remote/libvirtd.service.extra.in b/src/remote/libvirtd.ser= vice.extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/remote/libvirtd.service.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/remote/libvirtd.socket.extra.in b/src/remote/libvirtd.sock= et.extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/remote/libvirtd.socket.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/remote/meson.build b/src/remote/meson.build index 8b81a813f2..49d19b3cbf 100644 --- a/src/remote/meson.build +++ b/src/remote/meson.build @@ -192,6 +192,7 @@ if conf.has('WITH_REMOTE') 'service': 'libvirtd', 'service_in': files('libvirtd.service.in'), 'service_extra_in': [ + files('libvirtd.service.extra.in'), systemd_service_limitnofile_extra_in, systemd_service_taskmax_extra_in, systemd_service_limitmemlock_extra_in, @@ -203,6 +204,9 @@ if conf.has('WITH_REMOTE') 'socket_admin_in': files('libvirtd-admin.socket.in'), 'socket_tcp_in': files('libvirtd-tcp.socket.in'), 'socket_tls_in': files('libvirtd-tls.socket.in'), + 'socket_extra_in': [ + files('libvirtd.socket.extra.in'), + ], } =20 openrc_init_files +=3D { @@ -229,8 +233,14 @@ if conf.has('WITH_REMOTE') virt_daemon_units +=3D { 'service': 'virtproxyd', 'name': 'proxy', + 'service_extra_in': [ + files('virtproxyd.service.extra.in'), + ], 'sockprefix': 'libvirt', 'sockets': [ 'main', 'ro', 'admin', 'tcp', 'tls' ], + 'socket_extra_in': [ + files('virtproxyd.socket.extra.in'), + ], } =20 openrc_init_files +=3D { diff --git a/src/remote/virtproxyd.service.extra.in b/src/remote/virtproxyd= .service.extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/remote/virtproxyd.service.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/remote/virtproxyd.socket.extra.in b/src/remote/virtproxyd.= socket.extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/remote/virtproxyd.socket.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/secret/meson.build b/src/secret/meson.build index 791ce1a024..3b859ea7b4 100644 --- a/src/secret/meson.build +++ b/src/secret/meson.build @@ -34,6 +34,12 @@ if conf.has('WITH_SECRETS') virt_daemon_units +=3D { 'service': 'virtsecretd', 'name': 'secret', + 'service_extra_in': [ + files('virtsecretd.service.extra.in'), + ], + 'socket_extra_in': [ + files('virtsecretd.socket.extra.in'), + ], } =20 openrc_init_files +=3D { diff --git a/src/secret/virtsecretd.service.extra.in b/src/secret/virtsecre= td.service.extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/secret/virtsecretd.service.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/secret/virtsecretd.socket.extra.in b/src/secret/virtsecret= d.socket.extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/secret/virtsecretd.socket.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/storage/meson.build b/src/storage/meson.build index daad8abf25..404d6a6941 100644 --- a/src/storage/meson.build +++ b/src/storage/meson.build @@ -115,6 +115,9 @@ if conf.has('WITH_STORAGE') 'service_extra_in': [ files('virtstoraged.service.extra.in'), ], + 'socket_extra_in': [ + files('virtstoraged.socket.extra.in'), + ], } =20 openrc_init_files +=3D { diff --git a/src/storage/virtstoraged.service.extra.in b/src/storage/virtst= oraged.service.extra.in index d134ae18da..49fa4933e9 100644 --- a/src/storage/virtstoraged.service.extra.in +++ b/src/storage/virtstoraged.service.extra.in @@ -1,3 +1,6 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. + [Unit] After=3Discsid.service After=3Dremote-fs.target diff --git a/src/storage/virtstoraged.socket.extra.in b/src/storage/virtsto= raged.socket.extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/storage/virtstoraged.socket.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/vbox/meson.build b/src/vbox/meson.build index e05f532e35..a162865356 100644 --- a/src/vbox/meson.build +++ b/src/vbox/meson.build @@ -61,6 +61,9 @@ if conf.has('WITH_VBOX') 'service_extra_in': [ files('virtvboxd.service.extra.in'), ], + 'socket_extra_in': [ + files('virtvboxd.socket.extra.in'), + ], } =20 openrc_init_files +=3D { diff --git a/src/vbox/virtvboxd.service.extra.in b/src/vbox/virtvboxd.servi= ce.extra.in index ba3ad13ace..5367f7516c 100644 --- a/src/vbox/virtvboxd.service.extra.in +++ b/src/vbox/virtvboxd.service.extra.in @@ -1,2 +1,5 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. + [Unit] After=3Dremote-fs.target diff --git a/src/vbox/virtvboxd.socket.extra.in b/src/vbox/virtvboxd.socket= .extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/vbox/virtvboxd.socket.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. diff --git a/src/vz/meson.build b/src/vz/meson.build index bc5b5fb623..25d2b620d1 100644 --- a/src/vz/meson.build +++ b/src/vz/meson.build @@ -52,6 +52,9 @@ if conf.has('WITH_VZ') 'service_extra_in': [ files('virtvzd.service.extra.in'), ], + 'socket_extra_in': [ + files('virtvzd.socket.extra.in'), + ], } =20 openrc_init_files +=3D { diff --git a/src/vz/virtvzd.service.extra.in b/src/vz/virtvzd.service.extra= .in index ba3ad13ace..5367f7516c 100644 --- a/src/vz/virtvzd.service.extra.in +++ b/src/vz/virtvzd.service.extra.in @@ -1,2 +1,5 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. + [Unit] After=3Dremote-fs.target diff --git a/src/vz/virtvzd.socket.extra.in b/src/vz/virtvzd.socket.extra.in new file mode 100644 index 0000000000..1fc8c672f7 --- /dev/null +++ b/src/vz/virtvzd.socket.extra.in @@ -0,0 +1,2 @@ +# The contents of this unit will be merged into a base template. +# Additional units might be merged as well. See meson.build for details. --=20 2.41.0 From nobody Fri May 17 09:01:23 2024 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=1696236730; cv=none; d=zohomail.com; s=zohoarc; b=NQd+UafbKuOJ8yGb+ZLYS17SD5Z0NZUAEbUBPQQf4udGbYy3oPQJX0snjXid2HuDFTsY5blzOyTRI1KNYftk6tBpuIUFbY4a756kgPJkSbTLiSfj6ouyJZL3Q/PLHO9DYWtpDzMw7rbCoxQ6YVBweM3ph2xwES+xgUXg0P0J22U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696236730; 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=vVhPFt37OeZOjCK8JSFPqZluGPkHAUGPPWI/jWnFqOA=; b=AC55ndIJajckqIycMlxBfTNfCEXCydwD2db5rp/QPNrmBwdtiauKdITBuHTtpxc6NKRwhYgijKWhyYj3jDQUwPV955EpV0gerPGg0sIpWt2ruTNUO9q7bd59LW0L1kX9sF1a7gebc1atVo61GvHB9PaYEwDXesR3HRh1b0zxQio= 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 1696236729991932.1465082291342; Mon, 2 Oct 2023 01:52:09 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-12-PemeNKnLN9-zqVZUpCGZxA-1; Mon, 02 Oct 2023 04:51:40 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (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 1995A811E7D; Mon, 2 Oct 2023 08:51:37 +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 01B6C1005E2A; Mon, 2 Oct 2023 08:51:37 +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 DEE1C19465A3; Mon, 2 Oct 2023 08:51:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9AD7E19465B1 for ; Mon, 2 Oct 2023 08:51:35 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8D63CC03293; Mon, 2 Oct 2023 08:51:35 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.226.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 25062C15BB8 for ; Mon, 2 Oct 2023 08:51:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696236729; 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=vVhPFt37OeZOjCK8JSFPqZluGPkHAUGPPWI/jWnFqOA=; b=YcIxQ71TeKUcbrrk9kyy8ZdRcGCHYmmthSO2zf/HpZHK2GfBz8xqqrFfu1VsZFGjugH8hh 82URebv5yuglhqv34IYDaQWDSV1j3lGElZy4lw1/bbcibil9sefZhFn7uS3m4A5PBJHXPZ AGBPkdixK+eIWlHSsCfVPRFKDiqLZPg= X-MC-Unique: PemeNKnLN9-zqVZUpCGZxA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 10/11] systemd: Make service_extra_in/socket_extra_in required Date: Mon, 2 Oct 2023 10:51:25 +0200 Message-ID: <20231002085126.210149-11-abologna@redhat.com> In-Reply-To: <20231002085126.210149-1-abologna@redhat.com> References: <20231002085126.210149-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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.3 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: 1696236731957100001 Content-Type: text/plain; charset="utf-8"; x-default="true" We want at least one file to always be present, so that it can serve as a pointer for users. Ensure that this is the case by unconditionally using the value of the respective keys. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik --- src/meson.build | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/src/meson.build b/src/meson.build index 29c37a030a..0104e51571 100644 --- a/src/meson.build +++ b/src/meson.build @@ -207,8 +207,8 @@ systemd_service_oomscoreadjust_extra_in =3D files('virt= d.service.oomscoreadjust.ex # * sockets - array of additional sockets (optional, default [ 'main', '= ro', 'admin' ]) # * service_in - service source file (optional, default virtd.service.in) # * socket_$name_in - additional socket source files (optional, default = virtd.socket.in or virtd-$name.socket.in) -# * service_extra_in - units to merge with service_in (optional, default= []) -# * socket_extra_in - units to merge with socket_$name_in (optional, def= ault []) +# * service_extra_in - units to merge with service_in (required) +# * socket_extra_in - units to merge with socket_$name_in (required) virt_daemon_units =3D [] =20 # openrc_init_files @@ -830,14 +830,12 @@ if conf.has('WITH_LIBVIRTD') service_in =3D unit.get('service_in', service_in_default) service_out =3D '@0@.service'.format(unit['service']) =20 - if 'service_extra_in' in unit - service_in =3D configure_file( - input: [ service_in ] + unit['service_extra_in'], - output: '@0@.in'.format(service_out), - command: [ merge_systemd_units_prog, '@INPUT@' ], - capture: true, - ) - endif + service_in =3D configure_file( + input: [ service_in ] + unit['service_extra_in'], + output: '@0@.in'.format(service_out), + command: [ merge_systemd_units_prog, '@INPUT@' ], + capture: true, + ) =20 configure_file( input: service_in, @@ -858,14 +856,12 @@ if conf.has('WITH_LIBVIRTD') socket_out =3D '@0@-@1@.socket'.format(unit['service'], socket) endif =20 - if 'socket_extra_in' in unit - socket_in =3D configure_file( - input: [ socket_in ] + unit['socket_extra_in'], - output: '@0@.in'.format(socket_out), - command: [ merge_systemd_units_prog, '@INPUT@' ], - capture: true, - ) - endif + socket_in =3D configure_file( + input: [ socket_in ] + unit['socket_extra_in'], + output: '@0@.in'.format(socket_out), + command: [ merge_systemd_units_prog, '@INPUT@' ], + capture: true, + ) =20 configure_file( input: socket_in, --=20 2.41.0 From nobody Fri May 17 09:01:23 2024 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=1696236724; cv=none; d=zohomail.com; s=zohoarc; b=UU0wt9mG3S73ACl5kHexqfBi8IOTxcGJYtHdqH5DSMZoGSdW0PUkh7X6xr2x7SaXUR9TsmiA0BLzDjQZNPF/HD21sorvODtYkswqItd8QdRy5ycHj2WaKEMxps/dZ4I9NrenZ8v9hpEUvmgBOw2HN9zy46/JUc6la8ll/cpv8Dw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696236724; 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=BTfRfT0kErGW1MVi9de3Ecm+CP2wHcfZlRjChu1HFjw=; b=g2UNI8z5iSi1Sx/r03fKzNAikCDn3edZZdGujuoMUGpv7l3QcfWyR7JJo3mTxyrgUBKVDSskZa+Ib6xkl4hEva+jwzhpOj8zxJj90LYnFpTKn9FKgaBHzuYrw8I0VPyiDigrMOxAQC5S2Li3+9GqYvjljx8P2S3rqsXDzYKQKMg= 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 1696236724858919.7334041074207; Mon, 2 Oct 2023 01:52:04 -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-652-RV-8cAibNmyHETaPsuWAkw-1; Mon, 02 Oct 2023 04:51:40 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (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 CED1538210A3; Mon, 2 Oct 2023 08:51:37 +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 B706751E3; Mon, 2 Oct 2023 08:51:37 +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 ACC2F1946597; Mon, 2 Oct 2023 08:51:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5EF6E1946595 for ; Mon, 2 Oct 2023 08:51:36 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 43064C158BA; Mon, 2 Oct 2023 08:51:36 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.226.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CEB9EC154CB for ; Mon, 2 Oct 2023 08:51:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696236723; 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=BTfRfT0kErGW1MVi9de3Ecm+CP2wHcfZlRjChu1HFjw=; b=iATwlFrR90Yp0UMyoc3cQo3LffNrj1ZhTX9rqDhpXsm7N+z1cbTzNZC1wQThNWZKdIkaec w52P61u5Qtm3dpObn1L3+FvKH34x0BlepPljetmFWVIn6RthMOuNcdwyymawI84D5f2mwV dvEuPeXb+PYoIeLK232KVEvmFWQkKtM= X-MC-Unique: RV-8cAibNmyHETaPsuWAkw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 11/11] systemd: Tweak service definitions Date: Mon, 2 Oct 2023 10:51:26 +0200 Message-ID: <20231002085126.210149-12-abologna@redhat.com> In-Reply-To: <20231002085126.210149-1-abologna@redhat.com> References: <20231002085126.210149-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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.5 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: 1696236725946100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Use a consistent style everywhere. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik --- src/locking/meson.build | 2 +- src/logging/meson.build | 2 +- src/remote/meson.build | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/locking/meson.build b/src/locking/meson.build index 71e628de04..ff1578cfcb 100644 --- a/src/locking/meson.build +++ b/src/locking/meson.build @@ -143,13 +143,13 @@ if conf.has('WITH_LIBVIRTD') =20 virt_daemon_units +=3D { 'service': 'virtlockd', + 'name': 'locking', 'service_in': files('virtlockd.service.in'), 'service_extra_in': [ files('virtlockd.service.extra.in'), systemd_service_oomscoreadjust_extra_in, systemd_service_limitnofile_extra_in, ], - 'name': 'locking', 'sockets': [ 'main', 'admin' ], 'socket_in': files('virtlockd.socket.in'), 'socket_admin_in': files('virtlockd-admin.socket.in'), diff --git a/src/logging/meson.build b/src/logging/meson.build index f538a663fb..4d98113ac7 100644 --- a/src/logging/meson.build +++ b/src/logging/meson.build @@ -90,13 +90,13 @@ if conf.has('WITH_LIBVIRTD') =20 virt_daemon_units +=3D { 'service': 'virtlogd', + 'name': 'logging', 'service_in': files('virtlogd.service.in'), 'service_extra_in': [ files('virtlogd.service.extra.in'), systemd_service_oomscoreadjust_extra_in, systemd_service_limitnofile_extra_in, ], - 'name': 'logging', 'sockets': [ 'main', 'admin' ], 'socket_in': files('virtlogd.socket.in'), 'socket_admin_in': files('virtlogd-admin.socket.in'), diff --git a/src/remote/meson.build b/src/remote/meson.build index 49d19b3cbf..fba7e34c88 100644 --- a/src/remote/meson.build +++ b/src/remote/meson.build @@ -190,6 +190,7 @@ if conf.has('WITH_REMOTE') =20 virt_daemon_units +=3D { 'service': 'libvirtd', + 'name': 'legacy monolithic', 'service_in': files('libvirtd.service.in'), 'service_extra_in': [ files('libvirtd.service.extra.in'), @@ -197,7 +198,6 @@ if conf.has('WITH_REMOTE') systemd_service_taskmax_extra_in, systemd_service_limitmemlock_extra_in, ], - 'name': 'legacy monolithic', 'sockets': [ 'main', 'ro', 'admin', 'tcp', 'tls' ], 'socket_in': files('libvirtd.socket.in'), 'socket_ro_in': files('libvirtd-ro.socket.in'), --=20 2.41.0