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)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id E29597303F for ; Mon, 5 Jul 2021 12:58:04 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id DD8D21DA29 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 A61671D9FA 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 6DCA840471 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:13 +0200 Message-Id: <20210705105717.779369-1-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.226 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 KAM_NUMSUBJECT 0.5 Subject ends in numbers excluding current years SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_SBL_A 0.1 Contains URL's A record listed in the Spamhaus SBL blocklist [base.pm] Subject: [pve-devel] [PATCH manger/container v2 0/2] detect containers not supporting pure cgroupv2 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:58:04 -0000 changes v1->v2: incorporated Thomas' feedback (huge thx!) by: * adding extra handling for Alpine and Devuan container (patch 2/2 for pve-container) * copying the helpers directly to pve6to7 to avoid versioned dependency bumps * refactoring the code in pve6to7 a bit (also returning early for Alpine/Devuan) * adding a 'full' parameter (would be grateful for suggestions for a better fitting name) and only running this expensive check if it is provided (patch 2/2 for pve-manager) original cover-letter for v1: This series addresses the issue of running containers, which boot with a systemd version which is too old (<232) to support the unified cgroup hierarchy - This includes CentOS 7 and Ubuntu 16.04 containers. The patch for pve-container simply logs to syslog with level err to notify the user. Since container start runs through our stack into systemd (and back into our stack), I did not see a better option (grateful for feedback if there is of course). One alternative might be to mount the container once in vm_start (or the API calls), check and unmount again - but this seemed a bit expensive to do unconditionally on every start. The patch for pve6to7 simply loops through all containers and checks for the condition pve-container: Stoiko Ivanov (2): prestart-hook: detect cgroupv2 incompatible systemd version setup: shortcut cgroupv2 support for non-systemd distros src/PVE/LXC/Setup.pm | 8 ++++++++ src/PVE/LXC/Setup/Alpine.pm | 7 +++++++ src/PVE/LXC/Setup/Base.pm | 36 ++++++++++++++++++++++++++++++++++++ src/PVE/LXC/Setup/Devuan.pm | 7 +++++++ src/lxc-pve-prestart-hook | 7 +++++++ 5 files changed, 65 insertions(+) pve-manger: Stoiko Ivanov (2): pve6to7: check for containers not supporting pure cgroupv2 pve6to7: add 'full' parameter for expensive checks PVE/CLI/pve6to7.pm | 138 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 135 insertions(+), 3 deletions(-) -- 2.30.2