[pve-devel] [PATCH cluster v2 3/3] datacenter config: introduce feature flag for location rules
Thomas Lamprecht
t.lamprecht at proxmox.com
Mon Jun 23 17:58:37 CEST 2025
Am 20.06.25 um 16:31 schrieb Daniel Kral:
> Add a feature flag 'use-location-rules', which is used to control the
> behavior of how the HA WebGUI interface and HA API endpoints handle HA
> Groups and HA Location rules.
>
> If the flag is not set, HA Location rules shouldn't be able to be
> created or modified, but only allow their behavior to be represented
> with HA Groups, i.e. as it has been before. If they are present in the
> config, e.g. added manually, then they should be ignored.
>
> If the flag is set, the HA WebGUI and API endpoints should not allow HA
> Groups to be CRUD'd anymore, but only allow their behavior to be
> represented with HA Location rules. This also should expose the
> 'failback' property on HA services and disallow HA services to be
> assigned to HA groups through the API.
>
> Signed-off-by: Daniel Kral <d.kral at proxmox.com>
> ---
> changes since v1:
> - NEW!
>
> src/PVE/DataCenterConfig.pm | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/PVE/DataCenterConfig.pm b/src/PVE/DataCenterConfig.pm
> index 3c983b8..76c5706 100644
> --- a/src/PVE/DataCenterConfig.pm
> +++ b/src/PVE/DataCenterConfig.pm
> @@ -130,6 +130,12 @@ register_standard_option(
>
> my $ha_format = {
> shutdown_policy => get_standard_option('pve-ha-shutdown-policy'),
> + 'use-location-rules' => {
> + type => 'boolean',
> + description => "Whether HA Location rules should be used instead of HA groups.",
> + optional => 1,
> + default => 0,
it's IMO rather odd that one can enable this, then do some CRUD stuff and
then disable this flag here again, feels rather awkward and prone to user
errors.
I'd much rather see a transparent switch, where the new affinity system
parses and handles existing group definition, and when anything is written
out (group or affinity changes) then writes those group definitions also
out as such affinity rules and drops the group definitions (or just ignore
them completely once an affinity rule config exists).
If the building blocks are there this should not be really _that_ hard
I think.
> + },
> };
>
> my $next_id_format = {
More information about the pve-devel
mailing list