Fix cinder default log_dir

With the os_service_default updates, we introduced a regression since
the default log_dir needs to be specified if we want logs. Previously it
was defined as /var/log/cinder so this change adds it back in.

Change-Id: I51c3cb7be8c62cba3b9dbca292a7bb73d9a658b2
This commit is contained in:
Alex Schultz 2015-11-04 10:59:50 -06:00
parent 054569dd1c
commit 70daad9ea4
3 changed files with 9 additions and 7 deletions

View File

@ -183,8 +183,9 @@
#
# [*log_dir*]
# (optional) Directory where logs should be stored.
# If set to boolean false, it will not log to any directory.
# Defaults to undef.
# If set to boolean false or the $::os_service_default, it will not log to
# any directory.
# Defaults to '/var/log/cinder'.
#
# [*use_ssl*]
# (optional) Enable SSL on the API server
@ -279,7 +280,7 @@ class cinder (
$use_syslog = undef,
$use_stderr = undef,
$log_facility = undef,
$log_dir = undef,
$log_dir = '/var/log/cinder',
$verbose = undef,
$debug = undef,
$storage_availability_zone = 'nova',

View File

@ -26,8 +26,9 @@
#
# [*log_dir*]
# (optional) Directory where logs should be stored.
# If set to boolean false, it will not log to any directory.
# Defaults to $::os_service_default
# If set to boolean false or $::os_service_default, it will not log to any
# directory.
# Defaults to '/var/log/cinder'
#
# [*logging_context_format_string*]
# (Optional) Format string to use for log messages with context.
@ -94,7 +95,7 @@ class cinder::logging(
$use_syslog = $::os_service_default,
$use_stderr = $::os_service_default,
$log_facility = $::os_service_default,
$log_dir = $::os_service_default,
$log_dir = '/var/log/cinder',
$verbose = $::os_service_default,
$debug = $::os_service_default,
$logging_context_format_string = $::os_service_default,

View File

@ -56,7 +56,7 @@ describe 'cinder::logging' do
is_expected.to contain_cinder_config('DEFAULT/use_syslog').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('DEFAULT/use_stderr').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('DEFAULT/syslog_log_facility').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('DEFAULT/log_dir').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('DEFAULT/log_dir').with(:value => '/var/log/cinder')
is_expected.to contain_cinder_config('DEFAULT/verbose').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('DEFAULT/debug').with(:value => '<SERVICE DEFAULT>')
end