Signed-off-by: Daniel Kral <[email protected]>
---
 src/PVE/DataCenterConfig.pm | 38 +++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/src/PVE/DataCenterConfig.pm b/src/PVE/DataCenterConfig.pm
index 5c91f80..86bd06a 100644
--- a/src/PVE/DataCenterConfig.pm
+++ b/src/PVE/DataCenterConfig.pm
@@ -30,6 +30,44 @@ my $crs_format = {
             "Set to use CRS for selecting a suited node when a HA services 
request-state"
             . " changes from stop to start.",
     },
+    'ha-auto-rebalance' => {
+        type => 'boolean',
+        optional => 1,
+        default => 0,
+        description => "Set to use CRS for balancing HA resources 
automatically depending on"
+            . " the current node imbalance.",
+    },
+    'ha-auto-rebalance-threshold' => {
+        type => 'number',
+        optional => 1,
+        default => 0.7,
+        requires => 'ha-auto-rebalance',
+        description => "The threshold for the node load, which will trigger 
the automatic"
+            . " HA resource balancing if the threshold is exceeded.",
+    },
+    'ha-auto-rebalance-method' => {
+        type => 'string',
+        enum => ['bruteforce', 'topsis'],
+        optional => 1,
+        default => 'bruteforce',
+        requires => 'ha-auto-rebalance',
+    },
+    'ha-auto-rebalance-hold-duration' => {
+        type => 'number',
+        optional => 1,
+        default => 3,
+        requires => 'ha-auto-rebalance',
+        description => "The duration the threshold must be exceeded for to 
trigger an automatic"
+            . " HA resource balancing migration in HA rounds.",
+    },
+    'ha-auto-rebalance-margin' => {
+        type => 'number',
+        optional => 1,
+        default => 0.1,
+        requires => 'ha-auto-rebalance',
+        description => "The minimum relative improvement in cluster node 
imbalance to commit to"
+            . " a HA resource rebalancing migration.",
+    },
 };
 
 my $migration_format = {
-- 
2.47.3




Reply via email to