mirror of
git://git.proxmox.com/git/pve-ha-manager.git
synced 2025-01-19 14:03:53 +03:00
env: datacenter config: include crs (cluster-resource-scheduling) setting
Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
749d8161be
commit
7c142d6822
@ -456,12 +456,12 @@ sub get_datacenter_settings {
|
||||
my ($self) = @_;
|
||||
|
||||
my $datacenterconfig = eval { cfs_read_file('datacenter.cfg') };
|
||||
if (my $err = $@) {
|
||||
$self->log('err', "unable to get HA settings from datacenter.cfg - $err");
|
||||
return {};
|
||||
}
|
||||
$self->log('err', "unable to get HA settings from datacenter.cfg - $@") if $@;
|
||||
|
||||
return $datacenterconfig->{ha};
|
||||
return {
|
||||
ha => $datacenterconfig->{ha} // {},
|
||||
crs => $datacenterconfig->{crs} // {},
|
||||
};
|
||||
}
|
||||
|
||||
sub get_static_node_stats {
|
||||
|
@ -59,8 +59,8 @@ sub shutdown_request {
|
||||
|
||||
my ($shutdown, $reboot) = $haenv->is_node_shutdown();
|
||||
|
||||
my $dc_ha_cfg = $haenv->get_datacenter_settings();
|
||||
my $shutdown_policy = $dc_ha_cfg->{shutdown_policy} // 'conditional';
|
||||
my $dc_cfg = $haenv->get_datacenter_settings();
|
||||
my $shutdown_policy = $dc_cfg->{ha}->{shutdown_policy} // 'conditional';
|
||||
|
||||
if ($shutdown) { # don't log this on service restart, only on node shutdown
|
||||
$haenv->log('info', "got shutdown request with shutdown policy '$shutdown_policy'");
|
||||
|
@ -430,7 +430,10 @@ sub get_datacenter_settings {
|
||||
|
||||
my $datacenterconfig = $self->{hardware}->read_datacenter_conf();
|
||||
|
||||
return $datacenterconfig->{ha};
|
||||
return {
|
||||
ha => $datacenterconfig->{ha} // {},
|
||||
crs => $datacenterconfig->{crs} // {},
|
||||
};
|
||||
}
|
||||
|
||||
sub get_static_node_stats {
|
||||
|
Loading…
x
Reference in New Issue
Block a user