diff --git a/manifests/init.pp b/manifests/init.pp index 35eadb85..4648eb6e 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -8,28 +8,6 @@ # (optional) The state of gnocchi packages # Defaults to 'present' # -# [*log_dir*] -# (optional) Directory where logs should be stored. -# If set to boolean false or the $::os_service_default, it will not log to -# any directory. -# Defaults to undef -# -# [*debug*] -# (optional) Set log output to debug output. -# Defaults to undef -# -# [*use_syslog*] -# (optional) Use syslog for logging -# Defaults to undef -# -# [*use_stderr*] -# (optional) Use stderr for logging -# Defaults to undef -# -# [*log_facility*] -# (optional) Syslog facility to receive log lines. -# Defaults to undef -# # [*database_connection*] # (optional) Connection url for the gnocchi database. # Defaults to undef. @@ -41,18 +19,12 @@ # class gnocchi ( $package_ensure = 'present', - $debug = undef, - $use_syslog = undef, - $use_stderr = undef, - $log_dir = undef, - $log_facility = undef, $database_connection = undef, $purge_config = false, ) inherits gnocchi::params { include ::gnocchi::deps include ::gnocchi::db - include ::gnocchi::logging package { 'gnocchi': ensure => $package_ensure, diff --git a/manifests/logging.pp b/manifests/logging.pp index a3119081..178b6899 100644 --- a/manifests/logging.pp +++ b/manifests/logging.pp @@ -46,26 +46,14 @@ class gnocchi::logging( include ::gnocchi::deps - # note(spredzy): in order to keep backward compatibility we rely on the pick function - # to use gnocchi:: first then gnocchi::logging::. - $use_syslog_real = pick($::gnocchi::use_syslog,$use_syslog) - $use_stderr_real = pick($::gnocchi::use_stderr,$use_stderr) - $log_facility_real = pick($::gnocchi::log_facility,$log_facility) - if $log_dir != '' { - $log_dir_real = pick($::gnocchi::log_dir,$log_dir) - } else { - $log_dir_real = $log_dir - } - $debug_real = pick($::gnocchi::debug,$debug) - oslo::log { 'gnocchi_config': - debug => $debug_real, - use_syslog => $use_syslog_real, + debug => $debug, + use_syslog => $use_syslog, use_json => $use_json, use_journal => $use_journal, - use_stderr => $use_stderr_real, - log_dir => $log_dir_real, - syslog_log_facility => $log_facility_real, + use_stderr => $use_stderr, + log_dir => $log_dir, + syslog_log_facility => $log_facility, } } diff --git a/releasenotes/notes/dont-include-logging-init-46f9d159f3456994.yaml b/releasenotes/notes/dont-include-logging-init-46f9d159f3456994.yaml new file mode 100644 index 00000000..f331714b --- /dev/null +++ b/releasenotes/notes/dont-include-logging-init-46f9d159f3456994.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + gnocchi::logging is now not included in init class by default. diff --git a/spec/classes/gnocchi_init_spec.rb b/spec/classes/gnocchi_init_spec.rb index 956c96ab..93c645b2 100644 --- a/spec/classes/gnocchi_init_spec.rb +++ b/spec/classes/gnocchi_init_spec.rb @@ -9,9 +9,8 @@ describe 'gnocchi' do { :purge_config => false } end - it 'contains the logging class' do + it 'contains the deps class' do is_expected.to contain_class('gnocchi::deps') - is_expected.to contain_class('gnocchi::logging') end it 'installs packages' do