From nobody Sun May 19 13:54:37 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=1690967154; cv=none; d=zohomail.com; s=zohoarc; b=VEUFugadH0BfUOoycLzBit1rA0IE8+9RdQiBOxQntwsEhjOXKiFcGT/Tb1SyXlh3Uvo23BfIEmtytdw3dtO/Z5L2o/VOwKYZZYqNTIsKp7ozLClF4T6ujZYiK/ChY1XbC6KBsYQExwg701gqKBJwtIGyhgeu43MO+XKEqzrOaIs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1690967154; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=GP6ttO4Joqw5glCQuuNcRvuI2t57nC69WpcT65tjMrE=; b=a7dlZqnhRoHaXbf2+31PNqwCZ2o0xm29zRnWH6IqgGKwR8y3Bm72Tc2UGvdUtrfKyqdEgss6NfZXAbmyyk8BAPOI6kYHW1pu9WKpMrH8wyjn1YjroRnJthdyVQgeolHMtUeb/6QUu8Cft+HeHa2M7hCiQYI70qmS/S0tdL05UeY= 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 169096715400617.34183449821421; Wed, 2 Aug 2023 02:05:54 -0700 (PDT) Received: from mimecast-mx02.redhat.com (66.187.233.73 [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-640-dbN92dd0M8GeTTkJF2cjaA-1; Wed, 02 Aug 2023 05:05:45 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BB2871C09A45; Wed, 2 Aug 2023 09:05:42 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3FC38492B03; Wed, 2 Aug 2023 09:05:42 +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 17B5E1946A45; Wed, 2 Aug 2023 09:05:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 008171946A43 for ; Wed, 2 Aug 2023 09:05:40 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id D0655492CAE; Wed, 2 Aug 2023 09:05:40 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.42.28.125]) by smtp.corp.redhat.com (Postfix) with ESMTP id 09522492CA6; Wed, 2 Aug 2023 09:05:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690967153; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=GP6ttO4Joqw5glCQuuNcRvuI2t57nC69WpcT65tjMrE=; b=KqHzpvwukL2Prx9qw9ajm5ah6RXdNLKEbxAij0WlicRsE1vEMP3/xW6meJywz4vLJNEIG3 WT4YYelkZritGSoMvrouUZNAMiJopQWZgLYPS6NRoFw5YxBMU6+iySiNW1YrBspKQHepz1 36siO5rYSoBFtSM2a1IZ/OlFfirewJI= X-MC-Unique: dbN92dd0M8GeTTkJF2cjaA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH] src: fix max file limits in systemd services Date: Wed, 2 Aug 2023 10:05:38 +0100 Message-ID: <20230802090538.192161-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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: , Cc: Olaf Hering Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1690967155414100001 This fixes commit 38abf9c34dc481b0dc923bdab446ee623bdc5ab6 Author: Daniel P. Berrang=C3=A9 Date: Wed Jun 21 13:22:40 2023 +0100 src: set max open file limit to match systemd >=3D 240 defaults The bug referenced in that commit had suggested to set LimitNOFile=3D512000:1024 on the basis that matches current systemd default behaviour and is compatible with old systemd. That was good except * The setting is LimitNOFILE and these are case sensitive * The hard and soft limits were inverted - soft must come first and so it would have been ignored even if the setting name was correct. * The default hard limit is 524288 not 512000 Reported-by: Olaf Hering Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Martin Kletzander --- src/ch/virtchd.service.in | 2 +- src/locking/virtlockd.service.in | 2 +- src/logging/virtlogd.service.in | 2 +- src/lxc/virtlxcd.service.in | 2 +- src/qemu/virtqemud.service.in | 2 +- src/remote/libvirtd.service.in | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ch/virtchd.service.in b/src/ch/virtchd.service.in index be242fea78..351eee312b 100644 --- a/src/ch/virtchd.service.in +++ b/src/ch/virtchd.service.in @@ -24,7 +24,7 @@ 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=3D512000:1024 +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/virtlockd.service.in b/src/locking/virtlockd.servi= ce.in index f1792dcb43..dd0bbab083 100644 --- a/src/locking/virtlockd.service.in +++ b/src/locking/virtlockd.service.in @@ -18,7 +18,7 @@ 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=3D512000:1024 +LimitNOFILE=3D1024:524288 =20 [Install] Also=3Dvirtlockd.socket diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service= .in index cef4053f59..8e245ddb43 100644 --- a/src/logging/virtlogd.service.in +++ b/src/logging/virtlogd.service.in @@ -18,7 +18,7 @@ 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=3D512000:1024 +LimitNOFILE=3D1024:524288 =20 [Install] Also=3Dvirtlogd.socket diff --git a/src/lxc/virtlxcd.service.in b/src/lxc/virtlxcd.service.in index b615a3f32d..ee3a7f1083 100644 --- a/src/lxc/virtlxcd.service.in +++ b/src/lxc/virtlxcd.service.in @@ -24,7 +24,7 @@ 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=3D512000:1024 +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/qemu/virtqemud.service.in b/src/qemu/virtqemud.service.in index e3dc738b8f..e79670ca95 100644 --- a/src/qemu/virtqemud.service.in +++ b/src/qemu/virtqemud.service.in @@ -26,7 +26,7 @@ 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=3D512000:1024 +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 abac58cb2c..84f1613adc 100644 --- a/src/remote/libvirtd.service.in +++ b/src/remote/libvirtd.service.in @@ -31,7 +31,7 @@ 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=3D512000:1024 +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 --=20 2.41.0