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
This commit is contained in:

committed by
Alex Schultz

parent
a48d9b3076
commit
5e7845e20f
@@ -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({
|
||||
|
Reference in New Issue
Block a user