From: "Daniel Kral" <d.kral@proxmox.com>
To: "Thomas Lamprecht" <t.lamprecht@proxmox.com>,
<pve-devel@lists.proxmox.com>
Subject: Re: applied: [PATCH ha-manager 0/2] fix #7399: check if required rule props are set
Date: Thu, 12 Mar 2026 09:43:38 +0100 [thread overview]
Message-ID: <DH0O5Z1M38BW.39IUZH9GK2E1@proxmox.com> (raw)
In-Reply-To: <177324873128.3691844.8082191608142351429.b4-ty@proxmox.com>
On Wed Mar 11, 2026 at 6:06 PM CET, Thomas Lamprecht wrote:
> On Wed, 11 Mar 2026 13:49:34 +0100, Daniel Kral wrote:
>> The API endpoints allow users to set empty 'nodes' and 'resources'
>> properties for HA rules, which are not handled by the api schema
>> verification nor the api handlers themselves.
>>
>> PATCH 1 fixes the
>>
>> got unexpected error - cannot lookup undefined type! at
>> /usr/share/perl5/PVE/HA/Config.pm line 232.
>>
>> [...]
>
> Applied, thanks.
>
> Tiny nit: A short hint in 1/2 that not guarding the result of
> $class->lookup($rule->{type}) anymore is fine, as lookup dies
> anyway if the plugin cannot be found would have been nice here,
> but just a detail.
Good point, the helper does rely on the fact that we don't allow unknown
section types in the rules config and therefore $rule and $rule->{type}
not being set, but still existent in $rules->{ids}.
I'll keep that in mind in the future and address this in a patch series
which should reduce the amount of die's in the Manager.pm to only the
debug assertions!
>
> [1/2] rules: ensure rule is defined and has type in set_rule_defaults
> commit: 00a71f147a203d15e952ca016c188e3e8a0cb518
> [2/2] api: rules: check for non-empty nodes and resources properties
> commit: 41603823b12cdc10bb6041b002544795ddd0f91b
prev parent reply other threads:[~2026-03-12 8:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 12:49 Daniel Kral
2026-03-11 12:49 ` [PATCH ha-manager 1/2] rules: ensure rule is defined and has type in set_rule_defaults Daniel Kral
2026-03-12 9:49 ` Fiona Ebner
2026-03-11 12:49 ` [PATCH ha-manager 2/2] api: rules: check for non-empty nodes and resources properties Daniel Kral
2026-03-11 17:06 ` applied: [PATCH ha-manager 0/2] fix #7399: check if required rule props are set Thomas Lamprecht
2026-03-12 8:43 ` Daniel Kral [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DH0O5Z1M38BW.39IUZH9GK2E1@proxmox.com \
--to=d.kral@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=t.lamprecht@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox