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 F0F451FF137 for ; Tue, 31 Mar 2026 11:50:38 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0C4DD16F3C; Tue, 31 Mar 2026 11:51:06 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 31 Mar 2026 11:50:32 +0200 Message-Id: Subject: Re: [PATCH ha-manager 0/2] fix param check for rules updates and From: "Daniel Kral" To: =?utf-8?q?Michael_K=C3=B6ppl?= , X-Mailer: aerc 0.21.0-38-g7088c3642f2c-dirty References: <20260324124921.148515-1-m.koeppl@proxmox.com> In-Reply-To: <20260324124921.148515-1-m.koeppl@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1774950577377 X-SPAM-LEVEL: Spam detection results: 0 AWL -1.430 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 1 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 1 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 1 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. 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: 6J42F7RXWN7YQIK74BKSJMS76M2Y2CAT X-Message-ID-Hash: 6J42F7RXWN7YQIK74BKSJMS76M2Y2CAT X-MailFrom: d.kral@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 Tue Mar 24, 2026 at 1:49 PM CET, Michael K=C3=B6ppl wrote: > This series fixes the PUT API endpoint for updating a HA rule. > Previously, it would fail if the resources parameter was not set at all > as part of the request, even though the param is optional As part of an > E2E test run, the error showed up as > > 500 update HA rules failed: Can't use an undefined value as a HASH > reference at /usr/share/perl5/PVE/API2/HA/Rules.pm line 48. > > In addition, 2/2 fixes wrong formatting introduced by a recent commit. > > pve-ha-manager: > > Michael K=C3=B6ppl (2): > api: assert validity of resources param only if defined > format code with perltidy > > src/PVE/API2/HA/Rules.pm | 2 +- > src/PVE/HA/Usage/Static.pm | 6 ++++-- > 2 files changed, 5 insertions(+), 3 deletions(-) > > > Summary over all repositories: > 2 files changed, 5 insertions(+), 3 deletions(-) Yes, seems like I only tested it with (--resources, --nodes) being - (Some(''), None), - (Some('...'), None), - (Some('...'), Some('')), and - (Some('...'), Some('...')), but not the (None, _) variant in the end, thanks for spotting and fixing this! The reformatting in the second patch was already done by @Thomas on master, but the series still applies, consider as: Reviewed-by: Daniel Kral Tested-by: Daniel Kral