From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id D049972FF3 for ; Mon, 5 Jul 2021 12:57:34 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C7C8C1DA28 for ; Mon, 5 Jul 2021 12:57:34 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id B33DE1DA04 for ; Mon, 5 Jul 2021 12:57:33 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 7318140C4A for ; Mon, 5 Jul 2021 12:57:33 +0200 (CEST) From: Stoiko Ivanov To: pve-devel@lists.proxmox.com Date: Mon, 5 Jul 2021 12:57:15 +0200 Message-Id: <20210705105717.779369-3-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210705105717.779369-1-s.ivanov@proxmox.com> References: <20210705105717.779369-1-s.ivanov@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.530 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH container v2 2/2] setup: shortcut cgroupv2 support for non-systemd distros X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2021 10:57:34 -0000 Alpine and Devuan do not use systemd as init, thus run without problems in a pure cgroupv2 environment Signed-off-by: Stoiko Ivanov --- src/PVE/LXC/Setup/Alpine.pm | 7 +++++++ src/PVE/LXC/Setup/Devuan.pm | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/PVE/LXC/Setup/Alpine.pm b/src/PVE/LXC/Setup/Alpine.pm index e486971..5caeee7 100644 --- a/src/PVE/LXC/Setup/Alpine.pm +++ b/src/PVE/LXC/Setup/Alpine.pm @@ -106,4 +106,11 @@ sub setup_network { PVE::LXC::Setup::Debian::setup_network($self, $newconf); } +# non systemd based containers work with pure cgroupv2 +sub unified_cgroupv2_support { + my ($self) = @_; + + return 1; +} + 1; diff --git a/src/PVE/LXC/Setup/Devuan.pm b/src/PVE/LXC/Setup/Devuan.pm index d3d9019..3e15bb2 100644 --- a/src/PVE/LXC/Setup/Devuan.pm +++ b/src/PVE/LXC/Setup/Devuan.pm @@ -40,6 +40,13 @@ sub new { return bless $self, $class; } +# non systemd based containers work with pure cgroupv2 +sub unified_cgroupv2_support { + my ($self) = @_; + + return 1; +} + # the rest gets handled by the Debian plugin, which is compatible with older # non-systemd Debian versions for now. -- 2.30.2