Re: [PATCH ha-manager 0/2] fix param check for rules updates and

Daniel Kral
2026-03-31T09:50:38Z

On Tue Mar 24, 2026 at 1:49 PM CET, Michael Köppl 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öppl (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 <d.kral@proxmox.com>
Tested-by: Daniel Kral <d.kral@proxmox.com>