Merge "Add ability to specify number of workers for glance-registry service"
This commit is contained in:
commit
4bbdb70dbf
@ -24,6 +24,11 @@
|
|||||||
# [*bind_port*]
|
# [*bind_port*]
|
||||||
# (optional) The port the server should bind to. Defaults to '9191'.
|
# (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*]
|
# [*log_file*]
|
||||||
# (optional) Log file for glance-registry.
|
# (optional) Log file for glance-registry.
|
||||||
# If set to boolean false, it will not log to any file.
|
# If set to boolean false, it will not log to any file.
|
||||||
@ -129,6 +134,7 @@ class glance::registry(
|
|||||||
$debug = false,
|
$debug = false,
|
||||||
$bind_host = '0.0.0.0',
|
$bind_host = '0.0.0.0',
|
||||||
$bind_port = '9191',
|
$bind_port = '9191',
|
||||||
|
$workers = $::processorcount,
|
||||||
$log_file = '/var/log/glance/registry.log',
|
$log_file = '/var/log/glance/registry.log',
|
||||||
$log_dir = '/var/log/glance',
|
$log_dir = '/var/log/glance',
|
||||||
$database_connection = 'sqlite:///var/lib/glance/glance.sqlite',
|
$database_connection = 'sqlite:///var/lib/glance/glance.sqlite',
|
||||||
@ -206,6 +212,7 @@ class glance::registry(
|
|||||||
glance_registry_config {
|
glance_registry_config {
|
||||||
'DEFAULT/verbose': value => $verbose;
|
'DEFAULT/verbose': value => $verbose;
|
||||||
'DEFAULT/debug': value => $debug;
|
'DEFAULT/debug': value => $debug;
|
||||||
|
'DEFAULT/workers': value => $workers;
|
||||||
'DEFAULT/bind_host': value => $bind_host;
|
'DEFAULT/bind_host': value => $bind_host;
|
||||||
'DEFAULT/bind_port': value => $bind_port;
|
'DEFAULT/bind_port': value => $bind_port;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,8 @@ describe 'glance::registry' do
|
|||||||
|
|
||||||
let :facts do
|
let :facts do
|
||||||
{
|
{
|
||||||
:osfamily => 'Debian'
|
:osfamily => 'Debian',
|
||||||
|
:processorcount => '7',
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -13,6 +14,7 @@ describe 'glance::registry' do
|
|||||||
:debug => false,
|
:debug => false,
|
||||||
:bind_host => '0.0.0.0',
|
:bind_host => '0.0.0.0',
|
||||||
:bind_port => '9191',
|
:bind_port => '9191',
|
||||||
|
:workers => facts[:processorcount],
|
||||||
:log_file => '/var/log/glance/registry.log',
|
:log_file => '/var/log/glance/registry.log',
|
||||||
:log_dir => '/var/log/glance',
|
:log_dir => '/var/log/glance',
|
||||||
:database_connection => 'sqlite:///var/lib/glance/glance.sqlite',
|
:database_connection => 'sqlite:///var/lib/glance/glance.sqlite',
|
||||||
@ -39,6 +41,7 @@ describe 'glance::registry' do
|
|||||||
:debug => true,
|
:debug => true,
|
||||||
:bind_host => '127.0.0.1',
|
:bind_host => '127.0.0.1',
|
||||||
:bind_port => '9111',
|
:bind_port => '9111',
|
||||||
|
:workers => '5',
|
||||||
:database_connection => 'sqlite:///var/lib/glance.sqlite',
|
:database_connection => 'sqlite:///var/lib/glance.sqlite',
|
||||||
:database_idle_timeout => '360',
|
:database_idle_timeout => '360',
|
||||||
:enabled => false,
|
:enabled => false,
|
||||||
@ -98,6 +101,7 @@ describe 'glance::registry' do
|
|||||||
[
|
[
|
||||||
'verbose',
|
'verbose',
|
||||||
'debug',
|
'debug',
|
||||||
|
'workers',
|
||||||
'bind_port',
|
'bind_port',
|
||||||
'bind_host',
|
'bind_host',
|
||||||
].each do |config|
|
].each do |config|
|
||||||
|
Loading…
Reference in New Issue
Block a user