Merge "health_manager: support more tunable parameters"
This commit is contained in:
commit
c04af1ffc9
@ -21,12 +21,27 @@
|
||||
# (optional) The bind ip for the health manager
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*port*]
|
||||
# (optional) The bind port for the health manager
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*workers*]
|
||||
# (optional) The number of workers health_manager spawns
|
||||
# Defaults to $::os_workers
|
||||
#
|
||||
# [*port*]
|
||||
# (optional) The bind port for the health manager
|
||||
# [*failover_threads*]
|
||||
# (optional) The number of threads performing amphora failovers.
|
||||
#
|
||||
# [*heartbeat_timeout*]
|
||||
# (optional) Interval, in seconds, to wait before failing over an amphora.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*health_check_interval*]
|
||||
# (optional) Sleep time between health checks in seconds.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*sock_rlimit*]
|
||||
# (optional) Sets the value of the heartbeat recv buffer
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
@ -43,6 +58,10 @@ class octavia::health_manager (
|
||||
$ip = $::os_service_default,
|
||||
$port = $::os_service_default,
|
||||
$workers = $::os_workers,
|
||||
$failover_threads = $::os_service_default,
|
||||
$heartbeat_timeout = $::os_service_default,
|
||||
$health_check_interval = $::os_service_default,
|
||||
$sock_rlimit = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$event_streamer_driver = undef,
|
||||
|
||||
@ -85,5 +104,9 @@ class octavia::health_manager (
|
||||
'health_manager/bind_port' : value => $port;
|
||||
'health_manager/health_update_threads' : value => $workers;
|
||||
'health_manager/stats_update_threads' : value => $workers;
|
||||
'health_manager/failover_threads' : value => $failover_threads;
|
||||
'health_manager/heartbeat_timeout' : value => $heartbeat_timeout;
|
||||
'health_manager/health_check_interval' : value => $health_check_interval;
|
||||
'health_manager/sock_rlimit' : value => $sock_rlimit;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,10 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The following parameters have been added to the ``octavia::health_manager``
|
||||
class.
|
||||
|
||||
- ``failover_threads``
|
||||
- ``hearteat_timeout``
|
||||
- ``health_check_interval``
|
||||
- ``sock_rlimit``
|
@ -35,6 +35,10 @@ describe 'octavia::health_manager' do
|
||||
it { is_expected.to contain_octavia_config('health_manager/heartbeat_key').with_value('abcdefghi') }
|
||||
it { is_expected.to contain_octavia_config('health_manager/health_update_threads').with_value('2') }
|
||||
it { is_expected.to contain_octavia_config('health_manager/stats_update_threads').with_value('2') }
|
||||
it { is_expected.to contain_octavia_config('health_manager/failover_threads').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_octavia_config('health_manager/heartbeat_timeout').with_value('<SERVICE DEFAULT>') }
|
||||
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/sock_rlimit').with_value('<SERVICE DEFAULT>') }
|
||||
end
|
||||
|
||||
it 'installs octavia-health-manager package' do
|
||||
@ -96,10 +100,18 @@ describe 'octavia::health_manager' do
|
||||
before do
|
||||
params.merge!({
|
||||
:workers => 8,
|
||||
:failover_threads => 10,
|
||||
:heartbeat_timeout => 60,
|
||||
:health_check_interval => 3,
|
||||
:sock_rlimit => 1,
|
||||
})
|
||||
end
|
||||
it { is_expected.to contain_octavia_config('health_manager/health_update_threads').with_value(8) }
|
||||
it { is_expected.to contain_octavia_config('health_manager/stats_update_threads').with_value(8) }
|
||||
it { is_expected.to contain_octavia_config('health_manager/failover_threads').with_value(10) }
|
||||
it { is_expected.to contain_octavia_config('health_manager/heartbeat_timeout').with_value(60) }
|
||||
it { is_expected.to contain_octavia_config('health_manager/health_check_interval').with_value(3) }
|
||||
it { is_expected.to contain_octavia_config('health_manager/sock_rlimit').with_value(1) }
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user