Signed-off-by: Fiona Ebner <f.eb...@proxmox.com> --- src/PVE/HA/Env/PVE2.pm | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/src/PVE/HA/Env/PVE2.pm b/src/PVE/HA/Env/PVE2.pm index f6ebfeb..6a75bd4 100644 --- a/src/PVE/HA/Env/PVE2.pm +++ b/src/PVE/HA/Env/PVE2.pm @@ -458,9 +458,17 @@ sub get_datacenter_settings { my $datacenterconfig = eval { cfs_read_file('datacenter.cfg') }; $self->log('err', "unable to get HA settings from datacenter.cfg - $@") if $@; + my $sp_override_fn = '/run/pve-ha-lrm/shutdown-policy.local-override'; + my $shutdown_policy_override = eval { PVE::Tools::file_read_firstline($sp_override_fn); }; + $self->log('warning', "error reading shutdown policy override from $sp_override_fn - $@") if $@; + + my $overrides = {}; + $overrides->{ha}->{shutdown_policy} = $shutdown_policy_override if $shutdown_policy_override; + return { ha => $datacenterconfig->{ha} // {}, crs => $datacenterconfig->{crs} // {}, + 'local-overrides' => $overrides, }; } -- 2.39.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel