conductor: add workers parameter

Allow to configure workers for trove conductor.
Keep default from upstream, which is the same as API.

Change-Id: I942addf4347aaf813ef40d2ab39bac69a85a1a33
This commit is contained in:
Emilien Macchi 2016-04-01 11:23:03 -04:00
parent 80cf1085e2
commit 50dec1e92e
2 changed files with 7 additions and 0 deletions

View File

@ -50,6 +50,10 @@
# (optional) Trove conductor manager.
# Defaults to 'trove.conductor.manager.Manager'.
#
# [*workers*]
# (optional) Number of trove conductor worker processes to start
# Default: $::processorcount
#
class trove::conductor(
$enabled = true,
$manage_service = true,
@ -62,6 +66,7 @@ class trove::conductor(
$log_facility = 'LOG_USER',
$auth_url = 'http://localhost:5000/v2.0',
$conductor_manager = 'trove.conductor.manager.Manager',
$workers = $::processorcount,
) inherits trove {
include ::trove::deps
@ -94,6 +99,7 @@ class trove::conductor(
'DEFAULT/nova_proxy_admin_pass': value => $::trove::nova_proxy_admin_pass;
'DEFAULT/control_exchange': value => $::trove::control_exchange;
'DEFAULT/rpc_backend': value => $::trove::rpc_backend;
'DEFAULT/trove_conductor_workers': value => $workers;
}
if $::trove::rpc_backend == 'trove.openstack.common.rpc.impl_kombu' or $::trove::rpc_backend == 'rabbit' {

View File

@ -36,6 +36,7 @@ describe 'trove::conductor' do
is_expected.to contain_trove_conductor_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value(false)
is_expected.to contain_trove_conductor_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_conductor_config('oslo_messaging_rabbit/amqp_durable_queues').with_value(false)
is_expected.to contain_trove_conductor_config('DEFAULT/trove_conductor_workers').with_value('8')
end
context 'when using a single RabbitMQ server' do