[pve-devel] [PATCH cluster v2 3/3] datacenter config: introduce feature flag for location rules

Daniel Kral d.kral at proxmox.com
Fri Jun 20 16:31:12 CEST 2025


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,
+    },
 };
 
 my $next_id_format = {
-- 
2.39.5





More information about the pve-devel mailing list