[PATCH ha-manager v2 34/40] manager: update_crs_scheduler_mode: factor out crs config

Daniel Kral
2026-03-24T18:32:14Z

- no changes

src/PVE/HA/Manager.pm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/PVE/HA/Manager.pm b/src/PVE/HA/Manager.pm
index b954092b..872d43c4 100644
--- a/src/PVE/HA/Manager.pm
+++ b/src/PVE/HA/Manager.pm
@@ -91,11 +91,12 @@ sub update_crs_scheduler_mode {

my $haenv = $self->{haenv};
my $dc_cfg = $haenv->get_datacenter_settings();
+ my $crs_cfg = $dc_cfg->{crs};

- $self->{crs}->{rebalance_on_request_start} = !!$dc_cfg->{crs}->{'ha-rebalance-on-start'};
+ $self->{crs}->{rebalance_on_request_start} = !!$crs_cfg->{'ha-rebalance-on-start'};

my $old_mode = $self->{crs}->{scheduler};
- my $new_mode = $dc_cfg->{crs}->{ha} || 'basic';
+ my $new_mode = $crs_cfg->{ha} || 'basic';

if (!defined($old_mode)) {
$haenv->log('info', "using scheduler mode '$new_mode'") if $new_mode ne 'basic';
--
2.47.3