Browse Source

Remove deprecated logging

Change-Id: I767309510ab5d8c314a6c7001255626289085d2d
changes/13/620813/4
Tobias Urdin 4 years ago
parent
commit
5caabd1e65
  1. 27
      manifests/init.pp
  2. 22
      manifests/logging.pp
  3. 5
      releasenotes/notes/remove-deprecated-logging-9a75efe3f778ff40.yaml
  4. 4
      spec/classes/ceilometer_init_spec.rb

27
manifests/init.pp

@ -25,27 +25,6 @@
# (Optional) ensure state for package.
# Defaults to 'present'.
#
# [*debug*]
# (Optional) Should the daemons log debug messages.
# Defaults to undef.
#
# [*log_dir*]
# (Optional) Directory to which ceilometer logs are sent.
# If set to $::os_service_default, it will not log to any directory.
# 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.
#
# [*default_transport_url*]
# (optional) A URL representing the messaging driver to use and its full
# configuration. Transport URLs take the form:
@ -236,11 +215,6 @@ class ceilometer(
$notification_topics = ['notifications'],
$notification_driver = $::os_service_default,
$package_ensure = 'present',
$debug = undef,
$log_dir = undef,
$use_syslog = undef,
$use_stderr = undef,
$log_facility = undef,
$default_transport_url = $::os_service_default,
$rpc_response_timeout = $::os_service_default,
$control_exchange = $::os_service_default,
@ -294,7 +268,6 @@ class ceilometer(
}
include ::ceilometer::deps
include ::ceilometer::logging
include ::ceilometer::params
group { 'ceilometer':

22
manifests/logging.pp

@ -116,26 +116,14 @@ class ceilometer::logging(
include ::ceilometer::deps
# NOTE(spredzy): In order to keep backward compatibility we rely on the pick function
# to use ceilometer::<myparam> first then ceilometer::logging::<myparam>.
$use_syslog_real = pick($::ceilometer::use_syslog,$use_syslog)
$use_stderr_real = pick($::ceilometer::use_stderr,$use_stderr)
$log_facility_real = pick($::ceilometer::log_facility,$log_facility)
if $log_dir != '' {
$log_dir_real = pick($::ceilometer::log_dir,$log_dir)
} else {
$log_dir_real = $log_dir
}
$debug_real = pick($::ceilometer::debug,$debug)
oslo::log { 'ceilometer_config':
debug => $debug_real,
use_stderr => $use_stderr_real,
use_syslog => $use_syslog_real,
debug => $debug,
use_stderr => $use_stderr,
use_syslog => $use_syslog,
use_json => $use_json,
use_journal => $use_journal,
log_dir => $log_dir_real,
syslog_log_facility => $log_facility_real,
log_dir => $log_dir,
syslog_log_facility => $log_facility,
logging_context_format_string => $logging_context_format_string,
logging_default_format_string => $logging_default_format_string,
logging_debug_format_suffix => $logging_debug_format_suffix,

5
releasenotes/notes/remove-deprecated-logging-9a75efe3f778ff40.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.

4
spec/classes/ceilometer_init_spec.rb

@ -7,9 +7,6 @@ describe 'ceilometer' do
:http_timeout => '600',
:telemetry_secret => 'metering-s3cr3t',
:package_ensure => 'present',
:debug => 'False',
:log_dir => '/var/log/ceilometer',
:use_stderr => 'True',
:purge_config => false,
:host => 'foo.domain'
}
@ -63,7 +60,6 @@ describe 'ceilometer' do
shared_examples_for 'a ceilometer base installation' do
it { is_expected.to contain_class('ceilometer::logging') }
it { is_expected.to contain_class('ceilometer::params') }
it 'configures ceilometer group' do

Loading…
Cancel
Save