From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 9FBDB1FF0C0 for ; Wed, 18 Nov 2026 17:02:59 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 0631D217DD; Wed, 18 Nov 2026 17:02:57 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 18 Nov 2026 17:02:54 +0100 Message-Id: Subject: Re: [PATCH ha-manager v4 07/17] config: introduce separate parse_vmid_or_sid helper subroutine From: =?utf-8?q?Michael_K=C3=B6ppl?= To: "Daniel Kral" , X-Mailer: aerc 0.22.0 References: <20261118144502.231134-1-d.kral@proxmox.com> <20261118144502.231134-8-d.kral@proxmox.com> In-Reply-To: <20261118144502.231134-8-d.kral@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795017774097 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.183 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: PVDBUQUJDKYMGPHB4GXARKCTALR7JP6P X-Message-ID-Hash: PVDBUQUJDKYMGPHB4GXARKCTALR7JP6P X-MailFrom: m.koeppl@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: On Wed Nov 18, 2026 at 3:44 PM CET, Daniel Kral wrote: [snip] > @@ -361,7 +362,7 @@ __PACKAGE__->register_method({ > code =3D> sub { > my ($param) =3D @_; > > - my ($sid) =3D PVE::HA::Config::parse_sid(extract_param($param, '= sid')); > + my ($sid) =3D PVE::HA::Config::parse_vmid_or_sid(extract_param($= param, 'sid')); > my $purge =3D extract_param($param, 'purge') // 1; > > if (!PVE::HA::Config::service_is_configured($sid)) { > @@ -461,7 +462,7 @@ __PACKAGE__->register_method({ > > my $result =3D {}; > > - my ($sid) =3D PVE::HA::Config::parse_sid(extract_param($param, '= sid')); > + my ($sid) =3D PVE::HA::Config::parse_vmid_or_sid(extract_param($= param, 'sid')); After the rebase, the `resolve_type` hook of this endpoint still calls `parse_sid()`. With this patch applied, this results in `ha-manager migrate 100 pve2-cluster` failing with "unable to parse service id '100'", while passing `--resource-type vm` works. > my $req_node =3D extract_param($param, 'node'); > my $resource_type =3D extract_param($param, 'resource-type'); > if ($resource_type ne $type) { > @@ -585,7 +586,7 @@ __PACKAGE__->register_method({ > > my $result =3D {}; > > - my ($sid) =3D PVE::HA::Config::parse_sid(extract_param($param, '= sid')); > + my ($sid) =3D PVE::HA::Config::parse_vmid_or_sid(extract_param($= param, 'sid')); > my $req_node =3D extract_param($param, 'node'); > > PVE::HA::Config::service_is_ha_managed($sid); > diff --git a/src/PVE/CLI/ha_manager.pm b/src/PVE/CLI/ha_manager.pm [snip]