[pve-devel] [PATCH v2 ha-manager 09/15] manager: set resource scheduler mode upon init
Fiona Ebner
f.ebner at proxmox.com
Thu Nov 17 15:00:10 CET 2022
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
Changes from v1:
* Switch to get_datacenter_settings() replacing the previous
get_crs_settings() in v1.
src/PVE/HA/Manager.pm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/PVE/HA/Manager.pm b/src/PVE/HA/Manager.pm
index 63e6c8a..1638442 100644
--- a/src/PVE/HA/Manager.pm
+++ b/src/PVE/HA/Manager.pm
@@ -52,6 +52,11 @@ sub new {
$self->{ms} = { master_node => $haenv->nodename() };
+ my $dc_cfg = $haenv->get_datacenter_settings();
+ $self->{'scheduler-mode'} = $dc_cfg->{crs}->{ha} ? $dc_cfg->{crs}->{ha} : 'basic';
+ $haenv->log('info', "using scheduler mode '$self->{'scheduler-mode'}'")
+ if $self->{'scheduler-mode'} ne 'basic';
+
return $self;
}
--
2.30.2
More information about the pve-devel
mailing list