Add an ability to manage use_stderr parameter
When logging is already set up, it can be useful to disable this option to avoid logs duplication (collected by Upstart, for example) Change-Id: I1787191d9a512fdd3c3f79d6fadda110c5e41d54 Closes-bug: #1482564
This commit is contained in:
parent
92912b93d4
commit
1f4a545247
@ -125,6 +125,10 @@
|
||||
# (optional) Use syslog for logging.
|
||||
# Defaults to false.
|
||||
#
|
||||
# [*use_stderr*]
|
||||
# (optional) Use stderr for logging
|
||||
# Defaults to true
|
||||
#
|
||||
# [*log_facility*]
|
||||
# (optional) Syslog facility to receive log lines.
|
||||
# Defaults to 'LOG_USER'.
|
||||
@ -210,6 +214,7 @@ class glance::api(
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
$use_syslog = false,
|
||||
$use_stderr = true,
|
||||
$log_facility = 'LOG_USER',
|
||||
$show_image_direct_url = false,
|
||||
$purge_config = false,
|
||||
@ -293,6 +298,7 @@ class glance::api(
|
||||
glance_api_config {
|
||||
'DEFAULT/verbose': value => $verbose;
|
||||
'DEFAULT/debug': value => $debug;
|
||||
'DEFAULT/use_stderr': value => $use_stderr;
|
||||
'DEFAULT/bind_host': value => $bind_host;
|
||||
'DEFAULT/bind_port': value => $bind_port;
|
||||
'DEFAULT/backlog': value => $backlog;
|
||||
|
@ -91,6 +91,10 @@
|
||||
# (optional) Use syslog for logging.
|
||||
# Defaults to false.
|
||||
#
|
||||
# [*use_stderr*]
|
||||
# (optional) Use stderr for logging
|
||||
# Defaults to true
|
||||
#
|
||||
# [*log_facility*]
|
||||
# (optional) Syslog facility to receive log lines.
|
||||
# Defaults to LOG_USER.
|
||||
@ -146,6 +150,7 @@ class glance::registry(
|
||||
$keystone_user = 'glance',
|
||||
$pipeline = 'keystone',
|
||||
$use_syslog = false,
|
||||
$use_stderr = true,
|
||||
$log_facility = 'LOG_USER',
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
@ -210,11 +215,12 @@ 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;
|
||||
'DEFAULT/verbose': value => $verbose;
|
||||
'DEFAULT/debug': value => $debug;
|
||||
'DEFAULT/workers': value => $workers;
|
||||
'DEFAULT/bind_host': value => $bind_host;
|
||||
'DEFAULT/bind_port': value => $bind_port;
|
||||
'DEFAULT/use_stderr': value => $use_stderr;
|
||||
}
|
||||
|
||||
if $identity_uri {
|
||||
|
@ -13,6 +13,7 @@ describe 'glance::api' do
|
||||
{
|
||||
:verbose => false,
|
||||
:debug => false,
|
||||
:use_stderr => true,
|
||||
:bind_host => '0.0.0.0',
|
||||
:bind_port => '9292',
|
||||
:registry_host => '0.0.0.0',
|
||||
@ -98,6 +99,7 @@ describe 'glance::api' do
|
||||
[
|
||||
'verbose',
|
||||
'debug',
|
||||
'use_stderr',
|
||||
'bind_host',
|
||||
'bind_port',
|
||||
'registry_host',
|
||||
|
@ -12,6 +12,7 @@ describe 'glance::registry' do
|
||||
{
|
||||
:verbose => false,
|
||||
:debug => false,
|
||||
:use_stderr => true,
|
||||
:bind_host => '0.0.0.0',
|
||||
:bind_port => '9191',
|
||||
:workers => facts[:processorcount],
|
||||
@ -291,6 +292,12 @@ describe 'glance::registry' do
|
||||
it { is_expected.to contain_glance_registry_config('DEFAULT/key_file').with_ensure('absent')}
|
||||
end
|
||||
|
||||
describe 'with use_stderr enabled (default)' do
|
||||
let(:params) { default_params }
|
||||
|
||||
it { is_expected.to contain_glance_registry_config('DEFAULT/use_stderr').with_value('true')}
|
||||
end
|
||||
|
||||
describe 'with ssl options' do
|
||||
let :params do
|
||||
default_params.merge({
|
||||
|
Loading…
x
Reference in New Issue
Block a user