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.k...@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, + }, }; my $next_id_format = { -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel