heatlh_manager default to os_workers
health_manager has switched from spawning threads to processes. We
should have it follow the os_worker calculation.
Change-Id: I3abab863b210dcc6a75b70f9c14edb17e1713a97
(cherry picked from commit 5e7845e20f
)
This commit is contained in:
parent
a89884bc28
commit
5edb860ecf
|
@ -25,6 +25,10 @@
|
|||
# (optional) The bind ip 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
|
||||
# Defaults to $::os_service_default
|
||||
|
@ -37,6 +41,7 @@ class octavia::health_manager (
|
|||
$event_streamer_driver = $::os_service_default,
|
||||
$ip = $::os_service_default,
|
||||
$port = $::os_service_default,
|
||||
$workers = $::os_workers,
|
||||
) inherits octavia::params {
|
||||
|
||||
include ::octavia::deps
|
||||
|
@ -71,5 +76,7 @@ class octavia::health_manager (
|
|||
'health_manager/event_streamer_driver' : value => $event_streamer_driver;
|
||||
'health_manager/bind_ip' : value => $ip;
|
||||
'health_manager/bind_port' : value => $port;
|
||||
'health_manager/health_update_threads' : value => $workers;
|
||||
'health_manager/stats_update_threads' : value => $workers;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
features:
|
||||
- Add new parameter, "workers" to health_manager which
|
||||
defaults to $::os_workers
|
|
@ -33,6 +33,8 @@ describe 'octavia::health_manager' do
|
|||
})
|
||||
end
|
||||
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') }
|
||||
end
|
||||
|
||||
it 'installs octavia-health-manager package' do
|
||||
|
@ -97,6 +99,15 @@ describe 'octavia::health_manager' do
|
|||
it { is_expected.to contain_octavia_config('health_manager/bind_port').with_value('5555') }
|
||||
end
|
||||
|
||||
context 'configured with specific parameters' do
|
||||
before do
|
||||
params.merge!({
|
||||
:workers => 8,
|
||||
})
|
||||
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) }
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
|
|
Loading…
Reference in New Issue