[PATCH pve-cluster v2 6/6] datacenter config: add maxima for load scheduler options

Dominik Rusovac
2026-04-29T12:21:17Z

With load imbalance being clamped to unit interval,
'ha-auto-rebalance-threshold' should not exceed 1.0 either.

Upper bound of 1.0 for 'ha-auto-rebalance-margin' is already in place in
the web interface.

Signed-off-by: Dominik Rusovac <d.rusovac@proxmox.com>
---

Notes:
changes since v1:
* patch message is no longer empty

src/PVE/DataCenterConfig.pm | 2 ++
1 file changed, 2 insertions(+)

diff --git a/src/PVE/DataCenterConfig.pm b/src/PVE/DataCenterConfig.pm
index 6513594..d120017 100644
--- a/src/PVE/DataCenterConfig.pm
+++ b/src/PVE/DataCenterConfig.pm
@@ -44,6 +44,7 @@ EODESC
type => 'number',
optional => 1,
minimum => 0.0,
+ maximum => 1.0,
default => 0.3,
requires => 'ha-auto-rebalance',
description => "The threshold for the cluster node imbalance, which will"
@@ -72,6 +73,7 @@ EODESC
type => 'number',
optional => 1,
minimum => 0.0,
+ maximum => 1.0,
default => 0.1,
requires => 'ha-auto-rebalance',
description => "The minimum relative improvement in cluster node"
--
2.47.3