[pve-devel] [PATCH v2 ha-manager 07/15] env: rename get_ha_settings to get_datacenter_settings

Fiona Ebner f.ebner at proxmox.com
Thu Nov 17 15:00:08 CET 2022


The method will be extended to include other HA-relevant settings from
datacenter.cfg.

Suggested-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---

New in v2.

 src/PVE/HA/Env.pm      | 4 ++--
 src/PVE/HA/Env/PVE2.pm | 2 +-
 src/PVE/HA/LRM.pm      | 2 +-
 src/PVE/HA/Sim/Env.pm  | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/PVE/HA/Env.pm b/src/PVE/HA/Env.pm
index 00e3e3c..16603ec 100644
--- a/src/PVE/HA/Env.pm
+++ b/src/PVE/HA/Env.pm
@@ -263,10 +263,10 @@ sub get_max_workers {
 }
 
 # return cluster wide enforced HA settings
-sub get_ha_settings {
+sub get_datacenter_settings {
     my ($self) = @_;
 
-    return $self->{plug}->get_ha_settings();
+    return $self->{plug}->get_datacenter_settings();
 }
 
 sub get_static_node_stats {
diff --git a/src/PVE/HA/Env/PVE2.pm b/src/PVE/HA/Env/PVE2.pm
index 7fac43c..d2c46e8 100644
--- a/src/PVE/HA/Env/PVE2.pm
+++ b/src/PVE/HA/Env/PVE2.pm
@@ -452,7 +452,7 @@ sub get_max_workers {
 }
 
 # return cluster wide enforced HA settings
-sub get_ha_settings {
+sub get_datacenter_settings {
     my ($self) = @_;
 
     my $datacenterconfig = eval { cfs_read_file('datacenter.cfg') };
diff --git a/src/PVE/HA/LRM.pm b/src/PVE/HA/LRM.pm
index 8cbdb82..7750f4d 100644
--- a/src/PVE/HA/LRM.pm
+++ b/src/PVE/HA/LRM.pm
@@ -59,7 +59,7 @@ sub shutdown_request {
 
     my ($shutdown, $reboot) = $haenv->is_node_shutdown();
 
-    my $dc_ha_cfg = $haenv->get_ha_settings();
+    my $dc_ha_cfg = $haenv->get_datacenter_settings();
     my $shutdown_policy = $dc_ha_cfg->{shutdown_policy} // 'conditional';
 
     if ($shutdown) { # don't log this on service restart, only on node shutdown
diff --git a/src/PVE/HA/Sim/Env.pm b/src/PVE/HA/Sim/Env.pm
index 6bd35b3..6c47030 100644
--- a/src/PVE/HA/Sim/Env.pm
+++ b/src/PVE/HA/Sim/Env.pm
@@ -425,7 +425,7 @@ sub get_max_workers {
 }
 
 # return cluster wide enforced HA settings
-sub get_ha_settings {
+sub get_datacenter_settings {
     my ($self) = @_;
 
     my $datacenterconfig = $self->{hardware}->read_datacenter_conf();
-- 
2.30.2






More information about the pve-devel mailing list