Merge "Add ability to specify number of workers for glance-registry service"

This commit is contained in:
Jenkins 2015-08-11 22:50:20 +00:00 committed by Gerrit Code Review
commit 4bbdb70dbf
2 changed files with 12 additions and 1 deletions

View File

@ -24,6 +24,11 @@
# [*bind_port*]
# (optional) The port the server should bind to. Defaults to '9191'.
#
# [*workers*]
# (optional) The number of child process workers that will be
# created to service Registry requests.
# Defaults to: $::processorcount
#
# [*log_file*]
# (optional) Log file for glance-registry.
# If set to boolean false, it will not log to any file.
@ -129,6 +134,7 @@ class glance::registry(
$debug = false,
$bind_host = '0.0.0.0',
$bind_port = '9191',
$workers = $::processorcount,
$log_file = '/var/log/glance/registry.log',
$log_dir = '/var/log/glance',
$database_connection = 'sqlite:///var/lib/glance/glance.sqlite',
@ -206,6 +212,7 @@ class glance::registry(
glance_registry_config {
'DEFAULT/verbose': value => $verbose;
'DEFAULT/debug': value => $debug;
'DEFAULT/workers': value => $workers;
'DEFAULT/bind_host': value => $bind_host;
'DEFAULT/bind_port': value => $bind_port;
}

View File

@ -3,7 +3,8 @@ describe 'glance::registry' do
let :facts do
{
:osfamily => 'Debian'
:osfamily => 'Debian',
:processorcount => '7',
}
end
@ -13,6 +14,7 @@ describe 'glance::registry' do
:debug => false,
:bind_host => '0.0.0.0',
:bind_port => '9191',
:workers => facts[:processorcount],
:log_file => '/var/log/glance/registry.log',
:log_dir => '/var/log/glance',
:database_connection => 'sqlite:///var/lib/glance/glance.sqlite',
@ -39,6 +41,7 @@ describe 'glance::registry' do
:debug => true,
:bind_host => '127.0.0.1',
:bind_port => '9111',
:workers => '5',
:database_connection => 'sqlite:///var/lib/glance.sqlite',
:database_idle_timeout => '360',
:enabled => false,
@ -98,6 +101,7 @@ describe 'glance::registry' do
[
'verbose',
'debug',
'workers',
'bind_port',
'bind_host',
].each do |config|