From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 698161FF165 for ; Thu, 23 Oct 2025 13:24:23 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D1C928000; Thu, 23 Oct 2025 13:24:50 +0200 (CEST) From: Robert Obkircher To: pve-devel@lists.proxmox.com Date: Thu, 23 Oct 2025 13:22:26 +0200 Message-ID: <20251023112353.93915-2-r.obkircher@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251023112353.93915-1-r.obkircher@proxmox.com> References: <20251023112353.93915-1-r.obkircher@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1761218649945 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.000 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy 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 pve-container 1/1] fix 6897: warn that nesting may be required for systemd 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: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Signed-off-by: Robert Obkircher --- src/PVE/LXC/Setup.pm | 7 +++++++ src/PVE/LXC/Setup/Base.pm | 20 ++++++++++++++++++++ src/lxc-pve-prestart-hook | 5 +++++ 3 files changed, 32 insertions(+) diff --git a/src/PVE/LXC/Setup.pm b/src/PVE/LXC/Setup.pm index 87330c4..197b3ad 100644 --- a/src/PVE/LXC/Setup.pm +++ b/src/PVE/LXC/Setup.pm @@ -320,6 +320,13 @@ sub unified_cgroupv2_support { return $self->{plugin}->unified_cgroupv2_support($self->get_ct_init_path()); } +sub get_may_require_nesting_warning { + my ($self) = @_; + + my $init = $self->get_ct_init_path(); + return $self->{plugin}->get_may_require_nesting_warning($self->{conf}, $init); +} + # os-release(5): # (...) a newline-separated list of environment-like shell-compatible # variable assignments. (...) beyond mere variable assignments, no shell diff --git a/src/PVE/LXC/Setup/Base.pm b/src/PVE/LXC/Setup/Base.pm index a2c88ed..bcb26ba 100644 --- a/src/PVE/LXC/Setup/Base.pm +++ b/src/PVE/LXC/Setup/Base.pm @@ -647,6 +647,26 @@ sub get_ct_init_path { return $init_path; } +sub get_may_require_nesting_warning { + my ($self, $conf, $init) = @_; + + my $features = PVE::LXC::Config->parse_features($conf->{features}); + if ($features->{nesting}) { + return; + } + + if (!defined($init) || $init !~ m@/systemd$@) { + return; + } + + my $sdver = $self->get_systemd_version($init); + if (!defined($sdver) || $sdver < 232) { + return; + } + + return "Systemd $sdver detected. You might need to enable nesting."; +} + sub ssh_host_key_types_to_generate { my ($self) = @_; diff --git a/src/lxc-pve-prestart-hook b/src/lxc-pve-prestart-hook index 73125e1..09e8e44 100755 --- a/src/lxc-pve-prestart-hook +++ b/src/lxc-pve-prestart-hook @@ -172,6 +172,11 @@ PVE::LXC::Tools::lxc_hook( } } + my $nesting_warning = $lxc_setup->get_may_require_nesting_warning(); + if ($nesting_warning) { + log_warn($vmid, $nesting_warning); + } + if (@$devices) { my $devlist = ''; foreach my $dev (@$devices) { -- 2.47.3 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel