From 2b5f6bc87a74c754ae0eaecd2fbf39cb54b1f179 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Thu, 29 Nov 2018 10:29:44 +0100 Subject: [PATCH] Remove deprecated logging Change-Id: I6cdcfd0eb37444fc7e0fa02c4d875dd28537d6b9 --- manifests/init.pp | 27 ------------------- manifests/logging.pp | 22 ++++----------- ...e-deprecated-logging-2994ab3b4ae7a560.yaml | 5 ++++ spec/classes/heat_init_spec.rb | 4 --- 4 files changed, 10 insertions(+), 48 deletions(-) create mode 100644 releasenotes/notes/remove-deprecated-logging-2994ab3b4ae7a560.yaml diff --git a/manifests/init.pp b/manifests/init.pp index c71929b4..349e04b0 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -8,15 +8,6 @@ # (Optional) Ensure state for package. # Defaults to 'present' # -# [*debug*] -# (Optional) Should the daemons log debug messages -# Defaults to undef. -# -# [*log_dir*] -# (Optional) Directory where logs should be stored -# If set to $::os_service_default, it will not log to any directory -# Defaults to undef. -# # [*default_transport_url*] # (optional) A URL representing the messaging driver to use and its full # configuration. Transport URLs take the form: @@ -220,18 +211,6 @@ # (optional) If set, use this value for max_overflow with sqlalchemy. # 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. -# # [*flavor*] # (optional) Specifies the Authentication method. # Set to 'standalone' to get Heat to work with a remote OpenStack @@ -294,8 +273,6 @@ # class heat( $package_ensure = 'present', - $debug = undef, - $log_dir = undef, $keystone_ec2_uri = $::os_service_default, $default_transport_url = $::os_service_default, $rpc_response_timeout = $::os_service_default, @@ -329,9 +306,6 @@ class heat( $amqp_username = $::os_service_default, $amqp_password = $::os_service_default, $host = $::os_service_default, - $use_syslog = undef, - $use_stderr = undef, - $log_facility = undef, $database_connection = undef, $database_max_retries = undef, $database_idle_timeout = undef, @@ -359,7 +333,6 @@ class heat( $yaql_limit_iterators = $::os_service_default, ) { - include ::heat::logging include ::heat::db include ::heat::deps include ::heat::params diff --git a/manifests/logging.pp b/manifests/logging.pp index 1b5b3fcb..bb165de4 100644 --- a/manifests/logging.pp +++ b/manifests/logging.pp @@ -116,28 +116,16 @@ class heat::logging( include ::heat::deps - # NOTE(spredzy): In order to keep backward compatibility we rely on the pick function - # to use heat:: first then heat::logging::. - $use_syslog_real = pick($::heat::use_syslog,$use_syslog) - $use_stderr_real = pick($::heat::use_stderr,$use_stderr) - $log_facility_real = pick($::heat::log_facility,$log_facility) - if $log_dir != '' { - $log_dir_real = pick($::heat::log_dir,$log_dir) - } else { - $log_dir_real = $log_dir - } - $debug_real = pick($::heat::debug,$debug) - oslo::log { 'heat_config': - debug => $debug_real, + debug => $debug, log_config_append => $log_config_append, log_date_format => $log_date_format, - log_dir => $log_dir_real, - use_syslog => $use_syslog_real, + log_dir => $log_dir, + use_syslog => $use_syslog, use_json => $use_json, use_journal => $use_journal, - syslog_log_facility => $log_facility_real, - use_stderr => $use_stderr_real, + syslog_log_facility => $log_facility, + use_stderr => $use_stderr, logging_context_format_string => $logging_context_format_string, logging_default_format_string => $logging_default_format_string, logging_debug_format_suffix => $logging_debug_format_suffix, diff --git a/releasenotes/notes/remove-deprecated-logging-2994ab3b4ae7a560.yaml b/releasenotes/notes/remove-deprecated-logging-2994ab3b4ae7a560.yaml new file mode 100644 index 00000000..83979a5c --- /dev/null +++ b/releasenotes/notes/remove-deprecated-logging-2994ab3b4ae7a560.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/heat_init_spec.rb b/spec/classes/heat_init_spec.rb index b00a920d..cd81608b 100644 --- a/spec/classes/heat_init_spec.rb +++ b/spec/classes/heat_init_spec.rb @@ -10,9 +10,6 @@ describe 'heat' do let :params do { :package_ensure => 'present', - :debug => 'False', - :use_stderr => 'True', - :log_dir => '/var/log/heat', :database_connection => 'mysql+pymysql://user@host/database', :database_idle_timeout => 3600, :flavor => 'keystone', @@ -57,7 +54,6 @@ describe 'heat' do shared_examples_for 'a heat base installation' do - it { is_expected.to contain_class('heat::logging') } it { is_expected.to contain_class('heat::params') } it 'installs heat common package' do