Merge "Add related parameters to profiler section"

This commit is contained in:
Jenkins 2016-04-15 21:01:42 +00:00 committed by Gerrit Code Review
commit 8544b1a761
2 changed files with 17 additions and 0 deletions

View File

@ -54,6 +54,14 @@
# (optional) Number of trove conductor worker processes to start
# Default: $::processorcount
#
# [*enable_profiler*]
# (optional) If False fully disable profiling feature.
# Default: $::os_service_default
#
# [*trace_sqlalchemy*]
# (optional) If False doesn't trace SQL requests.
# Default: $::os_service_default
#
class trove::conductor(
$enabled = true,
$manage_service = true,
@ -67,6 +75,8 @@ class trove::conductor(
$auth_url = 'http://localhost:5000/v2.0',
$conductor_manager = 'trove.conductor.manager.Manager',
$workers = $::processorcount,
$enable_profiler = $::os_service_default,
$trace_sqlalchemy = $::os_service_default,
) inherits trove {
include ::trove::deps
@ -101,6 +111,11 @@ class trove::conductor(
'DEFAULT/rpc_backend': value => $::trove::rpc_backend;
'DEFAULT/trove_conductor_workers': value => $workers;
}
# profiler config
trove_conductor_config {
'profiler/enabled': value => $enable_profiler;
'profiler/trace_sqlalchemy': value => $trace_sqlalchemy;
}
if $::trove::rpc_backend == 'trove.openstack.common.rpc.impl_kombu' or $::trove::rpc_backend == 'rabbit' {
if ! $::trove::rabbit_password {

View File

@ -37,6 +37,8 @@ describe 'trove::conductor' do
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')
is_expected.to contain_trove_conductor_config('profiler/enabled').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_conductor_config('profiler/trace_sqlalchemy').with_value('<SERVICE DEFAULT>')
end
context 'when using a single RabbitMQ server' do