diff --git a/manifests/init.pp b/manifests/init.pp index 2d5121b..fde5127 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -3,6 +3,7 @@ # Mistral base package & configuration # # === Parameters +# # [*package_ensure*] # (Optional) Ensure state for package. # Defaults to 'present'. @@ -12,28 +13,6 @@ # communication with OpenStack services # Defaults to $::os_service_default # -# [*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 '/var/log/mistral'. -# -# [*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. -# -# [*debug*] -# (Optional) Should the daemons log debug messages -# Defaults to undef. -# # [*database_connection*] # (optional) Url used to connect to database. # Defaults to undef. @@ -200,11 +179,6 @@ class mistral( $kombu_ssl_version = $::os_service_default, $kombu_reconnect_delay = $::os_service_default, $amqp_durable_queues = $::os_service_default, - $use_syslog = undef, - $use_stderr = undef, - $log_dir = '/var/log/mistral', - $log_facility = undef, - $debug = undef, $coordination_backend_url = $::os_service_default, $coordination_heartbeat_interval = $::os_service_default, $purge_config = false, @@ -214,7 +188,6 @@ class mistral( include ::mistral::deps include ::mistral::params include ::mistral::db - include ::mistral::logging package { 'mistral-common': ensure => $package_ensure, diff --git a/manifests/logging.pp b/manifests/logging.pp index 46b383b..8728fb7 100644 --- a/manifests/logging.pp +++ b/manifests/logging.pp @@ -117,26 +117,14 @@ class mistral::logging( include ::mistral::deps - # NOTE(spredzy): In order to keep backward compatibility we rely on the pick function - # to use mistral:: if mistral::logging:: isn't specified. - $use_syslog_real = pick($::mistral::use_syslog,$use_syslog) - $use_stderr_real = pick($::mistral::use_stderr,$use_stderr) - $log_facility_real = pick($::mistral::log_facility,$log_facility) - if $log_dir != '' { - $log_dir_real = pick($::mistral::log_dir,$log_dir) - } else { - $log_dir_real = $log_dir - } - $debug_real = pick($::mistral::debug,$debug) - oslo::log { 'mistral_config': - use_syslog => $use_syslog_real, + use_syslog => $use_syslog, use_json => $use_json, use_journal => $use_journal, - use_stderr => $use_stderr_real, - syslog_log_facility => $log_facility_real, - log_dir => $log_dir_real, - debug => $debug_real, + use_stderr => $use_stderr, + syslog_log_facility => $log_facility, + log_dir => $log_dir, + debug => $debug, default_log_levels => $default_log_levels, logging_context_format_string => $logging_context_format_string, logging_default_format_string => $logging_default_format_string, diff --git a/releasenotes/notes/remove-deprecated-logging-1a61a633edfff7b0.yaml b/releasenotes/notes/remove-deprecated-logging-1a61a633edfff7b0.yaml new file mode 100644 index 0000000..83979a5 --- /dev/null +++ b/releasenotes/notes/remove-deprecated-logging-1a61a633edfff7b0.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + The deprecated parameters use_syslog, use_stderr, log_facility, log_dir and + debug in the init class is now removed. Please set them in the logging class. diff --git a/spec/classes/mistral_init_spec.rb b/spec/classes/mistral_init_spec.rb index bbb9ba4..b3889bf 100644 --- a/spec/classes/mistral_init_spec.rb +++ b/spec/classes/mistral_init_spec.rb @@ -20,7 +20,6 @@ describe 'mistral' do req_params end - it { should contain_class('mistral::logging') } it { should contain_class('mistral::params') } it { should contain_class('mysql::bindings::python') }