public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH ha-manager 0/2] fix #7399: check if required rule props are set
@ 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
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Daniel Kral @ 2026-03-11 12:49 UTC (permalink / raw)
  To: pve-devel

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.

error message for existing configs with invalid sections, which prevents
the CRM from doing any other progress. It will only keep logging the
hint that a section misses a required option.

PATCH 2 prevents users from passing empty strings for the 'nodes' and
'resources' parameters, which are catched before these are written to
the rules config itself.

A more general solution is proposed in [0], which fixes this behavior in
PVE::SectionConfig itself.

[0] https://lore.proxmox.com/pve-devel/20260311122659.250421-1-d.kral@proxmox.com/

Daniel Kral (2):
  rules: ensure rule is defined and has type in set_rule_defaults
  api: rules: check for non-empty nodes and resources properties

 src/PVE/API2/HA/Rules.pm | 16 ++++++++++------
 src/PVE/HA/Rules.pm      |  3 ++-
 2 files changed, 12 insertions(+), 7 deletions(-)

-- 
2.47.3





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-03-12  9:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-11 12:49 [PATCH ha-manager 0/2] fix #7399: check if required rule props are set 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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal