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: I6ceb1d38307db9ca7187d19e0b4a686e39c4a118
Closes-bug: #1482564
(cherry picked from commit 0b983460fe)
This commit is contained in:
Sergey Kolekonov 2015-08-07 15:44:11 +03:00 committed by Michal Rostecki
parent 97db2ac714
commit ef5cc4db1d
2 changed files with 11 additions and 0 deletions

View File

@ -84,6 +84,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
@ -135,6 +139,7 @@ class heat(
$sql_connection = false,
$database_idle_timeout = 3600,
$use_syslog = false,
$use_stderr = true,
$log_facility = 'LOG_USER',
$mysql_module = '0.9',
) {
@ -289,6 +294,7 @@ class heat(
'DEFAULT/rpc_backend' : value => $rpc_backend;
'DEFAULT/debug' : value => $debug;
'DEFAULT/verbose' : value => $verbose;
'DEFAULT/use_stderr' : value => $use_stderr;
'ec2authtoken/auth_uri' : value => $keystone_ec2_uri;
'keystone_authtoken/auth_host' : value => $keystone_host;
'keystone_authtoken/auth_port' : value => $keystone_port;

View File

@ -7,6 +7,7 @@ describe 'heat' do
:package_ensure => 'present',
:verbose => 'False',
:debug => 'False',
:use_stderr => 'True',
:log_dir => '/var/log/heat',
:rabbit_host => '127.0.0.1',
:rabbit_port => 5672,
@ -123,6 +124,10 @@ describe 'heat' do
should contain_heat_config('DEFAULT/verbose').with_value( params[:verbose] )
end
it 'configures use_stderr option' do
is_expected.to contain_heat_config('DEFAULT/use_stderr').with_value( params[:use_stderr] )
end
it 'configures auth_uri' do
should contain_heat_config('keystone_authtoken/auth_uri').with_value( params[:auth_uri] )
end