From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 9979D1FF09C for ; Mon, 19 Oct 2026 11:11:26 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id A99BC21698; Mon, 19 Oct 2026 11:11:23 +0200 (CEST) From: Filip Schauer To: pve-devel@lists.proxmox.com Subject: [PATCH container v2] lxc: remove unused find_lxc_console_pids helper Date: Mon, 19 Oct 2026 11:11:07 +0200 Message-ID: <20261019091112.34097-1-f.schauer@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1792401077881 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.792 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: KBAXNIV4GMONKDQ7VNMOVTOTWJFVMU5S X-Message-ID-Hash: KBAXNIV4GMONKDQ7VNMOVTOTWJFVMU5S X-MailFrom: f.schauer@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The helper is no longer needed, as its only user was the stale LXC console reaper in pve-manager, which was removed in 888c136dd303 ("fix #8093: pvestatd: remove stale lxc console reaper"). Drop the now dead code, and add a versioned Breaks against pve-manager (<< 9.2.22) to prevent pvestatd from crashing with an undefined subroutine error during partial upgrades. Signed-off-by: Filip Schauer --- debian/control | 1 + src/PVE/LXC.pm | 30 ------------------------------ 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/debian/control b/debian/control index ef57b13..1d77c38 100644 --- a/debian/control +++ b/debian/control @@ -41,5 +41,6 @@ Depends: binutils, xz-utils, ${misc:Depends}, ${perl:Depends}, +Breaks: pve-manager (<< 9.2.22), Description: Proxmox VE Container management tool Tool to manage Linux Containers on Proxmox VE. diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index e2e6ff6..785e547 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -409,36 +409,6 @@ sub vmstatus { return $list; } -sub find_lxc_console_pids { - - my $res = {}; - - PVE::Tools::dir_glob_foreach( - '/proc', - '\d+', - sub { - my ($pid) = @_; - - my $cmdline = PVE::Tools::file_read_firstline("/proc/$pid/cmdline"); - return if !$cmdline; - - my @args = split(/\0/, $cmdline); - - # search for lxc-console -n - return if scalar(@args) != 3; - return if $args[1] ne '-n'; - return if $args[2] !~ m/^\d+$/; - return if $args[0] !~ m|^(/usr/bin/)?lxc-console$|; - - my $vmid = $args[2]; - - push @{ $res->{$vmid} }, $pid; - }, - ); - - return $res; -} - sub find_lxc_pid { my ($vmid) = @_; -- 2.47.3