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 9B8961FF0AA for ; Tue, 20 Oct 2026 10:38:30 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id CE1FA21616; Tue, 20 Oct 2026 10:38:28 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 20 Oct 2026 10:38:25 +0200 Message-Id: To: "Filip Schauer" , Subject: Re: [PATCH container v2] lxc: remove unused find_lxc_console_pids helper From: "Elias Huhsovitz" X-Mailer: aerc 0.20.0 References: <20261019091112.34097-1-f.schauer@proxmox.com> In-Reply-To: <20261019091112.34097-1-f.schauer@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1792485505597 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.522 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: MWRCSAB6JTHHQLDOJOTJA4J2LIF7EDKN X-Message-ID-Hash: MWRCSAB6JTHHQLDOJOTJA4J2LIF7EDKN X-MailFrom: e.huhsovitz@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: Was unable to find this subroutine used anywhere. Also gave this a quick test and basic container usage did not throw any "undefined subroutine" errors. LGTM! Reviewed-by: Elias Huhsovitz Tested-by: Elias Huhsovitz On Mon Oct 19, 2026 at 11:11 AM CEST, Filip Schauer wrote: > 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; > } > =20 > -sub find_lxc_console_pids { > - > - my $res =3D {}; > - > - PVE::Tools::dir_glob_foreach( > - '/proc', > - '\d+', > - sub { > - my ($pid) =3D @_; > - > - my $cmdline =3D PVE::Tools::file_read_firstline("/proc/$pid/= cmdline"); > - return if !$cmdline; > - > - my @args =3D split(/\0/, $cmdline); > - > - # search for lxc-console -n > - return if scalar(@args) !=3D 3; > - return if $args[1] ne '-n'; > - return if $args[2] !~ m/^\d+$/; > - return if $args[0] !~ m|^(/usr/bin/)?lxc-console$|; > - > - my $vmid =3D $args[2]; > - > - push @{ $res->{$vmid} }, $pid; > - }, > - ); > - > - return $res; > -} > - > sub find_lxc_pid { > my ($vmid) =3D @_; > =20