Add multi-worker support

Since https://review.openstack.org/#/c/37131/ got merged, Neutron
supports now multiple worker processes for API server.

Change-Id: Ib01240c39de21306892f4f92e0ba3ecb56837a7c
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
Emilien Macchi 2013-11-30 16:16:17 +01:00
parent 37d1c5b810
commit 64c452b4fb
2 changed files with 14 additions and 2 deletions
manifests
spec/classes

@ -81,6 +81,14 @@
# Deprecates reconnect_interval
# Defaults to: 10
#
# [*api_workers*]
# (optional) Number of separate worker processes to spawn.
# The default, 0, runs the worker thread in the current process.
# Greater than 0 launches that number of child processes as workers.
# The parent process manages them.
# Defaults to: 0
#
class neutron::server (
$package_ensure = 'present',
$enabled = true,
@ -102,7 +110,8 @@ class neutron::server (
$reconnect_interval = '10',
$retry_interval = '10',
$log_file = false,
$log_dir = '/var/log/neutron'
$log_dir = '/var/log/neutron',
$api_workers = '0'
) {
include neutron::params
@ -157,6 +166,7 @@ class neutron::server (
}
neutron_config {
'DEFAULT/api_workers': value => $api_workers;
'database/connection': value => $connection_real;
'database/idle_timeout': value => $idle_timeout_real;
'database/retry_interval': value => $retry_interval_real;

@ -27,7 +27,8 @@ describe 'neutron::server' do
:sql_idle_timeout => '3600',
:idle_timeout => '3600',
:reconnect_interval => '10',
:retry_interval => '10' }
:retry_interval => '10',
:api_workers => '0'}
end
shared_examples_for 'a neutron server' do
@ -82,6 +83,7 @@ describe 'neutron::server' do
should contain_neutron_api_config('filter:authtoken/auth_admin_prefix').with(
:ensure => 'absent'
)
should contain_neutron_config('DEFAULT/api_workers').with_value('0')
end
end