Merge "Remove deprecated logging"
This commit is contained in:
commit
cbe4f411fd
@ -105,23 +105,6 @@
|
||||
# (optional) Use durable queues in amqp.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*use_stderr*]
|
||||
# (optional) Use stderr for logging
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*use_syslog*]
|
||||
# Use syslog for logging.
|
||||
# (Optional) Defaults to false.
|
||||
#
|
||||
# [*log_facility*]
|
||||
# Syslog facility to receive log lines.
|
||||
# (Optional) Defaults to LOG_USER.
|
||||
#
|
||||
# [*log_dir*]
|
||||
# (optional) Directory where logs should be stored.
|
||||
# If set to $::os_service_default, it will not log to any directory.
|
||||
# Defaults to '/var/log/manila'
|
||||
#
|
||||
# [*use_ssl*]
|
||||
# (optional) Enable SSL on the API server
|
||||
# Defaults to false, not set
|
||||
@ -138,10 +121,6 @@
|
||||
# (optional) CA certificate file to use to verify connecting clients
|
||||
# Defaults to false, not set_
|
||||
#
|
||||
# [*debug*]
|
||||
# (Optional) Should the daemons log debug messages
|
||||
# Defaults to false
|
||||
#
|
||||
# [*api_paste_config*]
|
||||
# (Optional) Allow Configuration of /etc/manila/api-paste.ini.
|
||||
#
|
||||
@ -259,11 +238,6 @@ class manila (
|
||||
$cert_file = false,
|
||||
$key_file = false,
|
||||
$api_paste_config = '/etc/manila/api-paste.ini',
|
||||
$use_stderr = undef,
|
||||
$use_syslog = undef,
|
||||
$log_facility = undef,
|
||||
$log_dir = undef,
|
||||
$debug = undef,
|
||||
$storage_availability_zone = 'nova',
|
||||
$rootwrap_config = '/etc/manila/rootwrap.conf',
|
||||
$state_path = '/var/lib/manila',
|
||||
@ -290,7 +264,6 @@ class manila (
|
||||
|
||||
include ::manila::deps
|
||||
include ::manila::db
|
||||
include ::manila::logging
|
||||
include ::manila::params
|
||||
|
||||
if $use_ssl {
|
||||
|
@ -116,26 +116,14 @@ class manila::logging(
|
||||
|
||||
include ::manila::deps
|
||||
|
||||
# NOTE(spredzy): In order to keep backward compatibility we rely on the pick function
|
||||
# to use manila::<myparam> first then manila::logging::<myparam>.
|
||||
$use_syslog_real = pick($::manila::use_syslog,$use_syslog)
|
||||
$use_stderr_real = pick($::manila::use_stderr,$use_stderr)
|
||||
$log_facility_real = pick($::manila::log_facility,$log_facility)
|
||||
if $log_dir != '' {
|
||||
$log_dir_real = pick($::manila::log_dir,$log_dir)
|
||||
} else {
|
||||
$log_dir_real = $log_dir
|
||||
}
|
||||
$debug_real = pick($::manila::debug,$debug)
|
||||
|
||||
oslo::log { 'manila_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,
|
||||
logging_context_format_string => $logging_context_format_string,
|
||||
logging_default_format_string => $logging_default_format_string,
|
||||
logging_debug_format_suffix => $logging_debug_format_suffix,
|
||||
|
@ -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.
|
@ -28,10 +28,12 @@ describe 'basic manila' do
|
||||
}
|
||||
|
||||
# Manila resources
|
||||
class { '::manila::logging':
|
||||
debug => true,
|
||||
}
|
||||
class { '::manila':
|
||||
default_transport_url => 'rabbit://manila:an_even_bigger_secret@127.0.0.1:5672/',
|
||||
sql_connection => 'mysql+pymysql://manila:a_big_secret@127.0.0.1/manila?charset=utf8',
|
||||
debug => true,
|
||||
}
|
||||
class { '::manila::db::mysql':
|
||||
password => 'a_big_secret',
|
||||
|
@ -13,7 +13,6 @@ describe 'manila' do
|
||||
req_params
|
||||
end
|
||||
|
||||
it { is_expected.to contain_class('manila::logging') }
|
||||
it { is_expected.to contain_class('manila::params') }
|
||||
|
||||
it 'passes purge to resource' do
|
||||
@ -50,9 +49,6 @@ describe 'manila' do
|
||||
is_expected.to contain_manila_config('oslo_messaging_rabbit/kombu_failover_strategy').with(
|
||||
:value => '<SERVICE DEFAULT>'
|
||||
)
|
||||
is_expected.to contain_manila_config('DEFAULT/debug').with(
|
||||
:value => '<SERVICE DEFAULT>'
|
||||
)
|
||||
is_expected.to contain_manila_config('DEFAULT/storage_availability_zone').with(
|
||||
:value => 'nova'
|
||||
)
|
||||
@ -74,7 +70,6 @@ describe 'manila' do
|
||||
is_expected.to contain_oslo__messaging__rabbit('manila_config').with(
|
||||
:rabbit_use_ssl => '<SERVICE DEFAULT>',
|
||||
)
|
||||
is_expected.to contain_oslo__log('manila_config').with(:log_dir => '/var/log/manila')
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user