Add health_manager::failover_threshold parameter

This parameter was added in Zed as part of the Failover stop threshold
feature [0]

[0] https://review.opendev.org/c/openstack/octavia/+/656811

Change-Id: I637e89a794203c393c50728b42666a0d2a104849
This commit is contained in:
Gregory Thiemonge 2022-09-15 17:09:57 +02:00
parent bc746b3867
commit 501e54596e
3 changed files with 15 additions and 0 deletions

View File

@ -46,6 +46,11 @@
# (optional) Sets the value of the heartbeat recv buffer
# Defaults to $::os_service_default
#
# [*failover_threshold*]
# (optional) Stop failovers if the count of simultaneously failed amphora
# reaches this number.
# Defaults to $::os_service_default
#
# DEPRECATED PARAMETERS
#
# [*workers*]
@ -72,6 +77,7 @@ class octavia::health_manager (
$heartbeat_timeout = $::os_service_default,
$health_check_interval = $::os_service_default,
$sock_rlimit = $::os_service_default,
$failover_threshold = $::os_service_default,
# DEPRECATED PARAMETERS
$workers = undef,
$heartbeat_key = undef,
@ -128,6 +134,7 @@ Use health_update_threads and stats_update_threads instead')
'health_manager/heartbeat_timeout' : value => $heartbeat_timeout;
'health_manager/health_check_interval' : value => $health_check_interval;
'health_manager/sock_rlimit' : value => $sock_rlimit;
'health_manager/failover_threshold' : value => $failover_threshold;
}
if $::octavia::controller::heartbeat_key == undef {

View File

@ -0,0 +1,5 @@
---
features:
- |
Add new parameter ``failover_threshold`` to the ``octavia::health_manager``
class.

View File

@ -40,6 +40,7 @@ describe 'octavia::health_manager' do
it { is_expected.to contain_octavia_config('health_manager/health_check_interval').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_octavia_config('health_manager/heartbeat_interval').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_octavia_config('health_manager/sock_rlimit').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_octavia_config('health_manager/failover_threshold').with_value('<SERVICE DEFAULT>') }
end
it 'installs octavia-health-manager package' do
@ -107,6 +108,7 @@ describe 'octavia::health_manager' do
:health_check_interval => 3,
:heartbeat_interval => 42,
:sock_rlimit => 1,
:failover_threshold => 2,
})
end
it { is_expected.to contain_octavia_config('health_manager/health_update_threads').with_value(8) }
@ -116,6 +118,7 @@ describe 'octavia::health_manager' do
it { is_expected.to contain_octavia_config('health_manager/health_check_interval').with_value(3) }
it { is_expected.to contain_octavia_config('health_manager/heartbeat_interval').with_value(42) }
it { is_expected.to contain_octavia_config('health_manager/sock_rlimit').with_value(1) }
it { is_expected.to contain_octavia_config('health_manager/failover_threshold').with_value(2) }
end
end