Merge "Revert "Deprecate some log options""
This commit is contained in:
commit
c93093d9cd
manifests
releasenotes/notes
spec/classes
@ -306,6 +306,10 @@
|
||||
# (optional) CA certificate file to use to verify connecting clients
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*use_syslog*]
|
||||
# (optional) Use syslog for logging
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*use_stderr*]
|
||||
# (optional) Use stderr for logging
|
||||
# Defaults to undef
|
||||
@ -363,12 +367,8 @@
|
||||
# (optional) Deprecated. Verbose logging
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*use_syslog*]
|
||||
# (optional) Deprecated. Use syslog for logging
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*log_facility*]
|
||||
# (optional) Deprecated. Syslog facility to receive log lines
|
||||
# (optional) Syslog facility to receive log lines
|
||||
# Defaults to undef
|
||||
#
|
||||
class neutron (
|
||||
@ -440,6 +440,7 @@ class neutron (
|
||||
$cert_file = $::os_service_default,
|
||||
$key_file = $::os_service_default,
|
||||
$ca_file = $::os_service_default,
|
||||
$use_syslog = undef,
|
||||
$use_stderr = undef,
|
||||
$log_file = undef,
|
||||
$log_dir = undef,
|
||||
@ -453,7 +454,6 @@ class neutron (
|
||||
# DEPRECATED PARAMETERS
|
||||
$network_device_mtu = undef,
|
||||
$verbose = undef,
|
||||
$use_syslog = undef,
|
||||
$log_facility = undef,
|
||||
) {
|
||||
|
||||
@ -466,14 +466,6 @@ class neutron (
|
||||
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
|
||||
}
|
||||
|
||||
if $use_syslog {
|
||||
warning('use_syslog is deprecated, has no effect and will be removed in a future release.')
|
||||
}
|
||||
|
||||
if $log_facility {
|
||||
warning('log_facility is deprecated, has no effect and will be removed after Newton cycle.')
|
||||
}
|
||||
|
||||
if ! is_service_default($use_ssl) and ($use_ssl) {
|
||||
if is_service_default($cert_file) {
|
||||
fail('The cert_file parameter is required when use_ssl is set to true')
|
||||
@ -496,6 +488,10 @@ class neutron (
|
||||
warning('kombu_missing_consumer_retry_timeout should not be longer than rpc_response_timeout')
|
||||
}
|
||||
|
||||
if $log_facility {
|
||||
warning('log_facility is deprecated, has no effect and will be removed after Newton cycle.')
|
||||
}
|
||||
|
||||
if $memcache_servers {
|
||||
validate_array($memcache_servers)
|
||||
}
|
||||
|
@ -8,6 +8,10 @@
|
||||
# (optional) Print debug messages in the logs
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*use_syslog*]
|
||||
# (optional) Use syslog for logging
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*use_stderr*]
|
||||
# (optional) Use stderr for logging
|
||||
# Defaults to $::os_service_default
|
||||
@ -99,16 +103,13 @@
|
||||
# (optional) Deprecated. Verbose logging
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*use_syslog*]
|
||||
# (optional) Deprecated. Use syslog for logging
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*log_facility*]
|
||||
# (optional) Deprecated. Syslog facility to receive log lines
|
||||
# (optional) Syslog facility to receive log lines
|
||||
# Defaults to undef
|
||||
#
|
||||
class neutron::logging (
|
||||
$debug = $::os_service_default,
|
||||
$use_syslog = $::os_service_default,
|
||||
$use_stderr = $::os_service_default,
|
||||
$log_file = $::os_service_default,
|
||||
$log_dir = '/var/log/neutron',
|
||||
@ -128,11 +129,11 @@ class neutron::logging (
|
||||
$fatal_deprecations = $::os_service_default,
|
||||
# Deprecated
|
||||
$verbose = undef,
|
||||
$use_syslog = undef,
|
||||
$log_facility = undef,
|
||||
) {
|
||||
|
||||
$debug_real = pick($::neutron::debug,$debug)
|
||||
$use_syslog_real = pick($::neutron::use_syslog,$use_syslog)
|
||||
$use_stderr_real = pick($::neutron::use_stderr,$use_stderr)
|
||||
$log_file_real = pick($::neutron::log_file,$log_file)
|
||||
$log_dir_real = pick($::neutron::log_dir,$log_dir)
|
||||
@ -141,10 +142,6 @@ class neutron::logging (
|
||||
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
|
||||
}
|
||||
|
||||
if $use_syslog {
|
||||
warning('use_syslog is deprecated, has no effect and will be removed in a future release')
|
||||
}
|
||||
|
||||
if $log_facility {
|
||||
warning('log_facility is deprecated, has no effect and will be removed after Newton cycle. Please use syslog_log_facility instead.')
|
||||
}
|
||||
@ -152,6 +149,7 @@ class neutron::logging (
|
||||
oslo::log { 'neutron_config':
|
||||
debug => $debug_real,
|
||||
use_stderr => $use_stderr_real,
|
||||
use_syslog => $use_syslog_real,
|
||||
syslog_log_facility => $syslog_log_facility,
|
||||
log_file => $log_file_real,
|
||||
log_dir => $log_dir_real,
|
||||
|
@ -1,5 +1,3 @@
|
||||
---
|
||||
deprecations:
|
||||
- use_syslog in DEFAULT section was deprecated in Mitaka, this parameter
|
||||
has no effect and will be removed in a future release.
|
||||
- log_facility is Deprecated and will be removed after Newton cycle.
|
||||
|
@ -76,6 +76,8 @@ describe 'neutron' do
|
||||
it_configures 'with SSL socket options set'
|
||||
it_configures 'with SSL socket options set with wrong parameters'
|
||||
it_configures 'with SSL socket options left by default'
|
||||
it_configures 'with syslog disabled'
|
||||
it_configures 'with syslog enabled'
|
||||
it_configures 'with log_file specified'
|
||||
it_configures 'without service_plugins'
|
||||
it_configures 'with service_plugins'
|
||||
@ -263,6 +265,14 @@ describe 'neutron' do
|
||||
it_raises 'a Puppet::Error', /The ca_file parameter requires that use_ssl to be set to true/
|
||||
end
|
||||
|
||||
shared_examples_for 'with syslog disabled' do
|
||||
before do
|
||||
params.merge!(
|
||||
:use_syslog => false,
|
||||
)
|
||||
end
|
||||
it { is_expected.to contain_neutron_config('DEFAULT/use_syslog').with_value(false) }
|
||||
end
|
||||
|
||||
shared_examples_for 'with non-default kombu options' do
|
||||
before do
|
||||
@ -348,6 +358,18 @@ describe 'neutron' do
|
||||
|
||||
end
|
||||
|
||||
shared_examples_for 'with syslog enabled' do
|
||||
before do
|
||||
params.merge!(
|
||||
:use_syslog => 'true'
|
||||
)
|
||||
end
|
||||
|
||||
it do
|
||||
is_expected.to contain_neutron_config('DEFAULT/use_syslog').with_value(true)
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for 'with log_file specified' do
|
||||
before do
|
||||
params.merge!(
|
||||
|
@ -24,6 +24,7 @@ describe 'neutron::logging' do
|
||||
:instance_format => '[instance: %(uuid)s] ',
|
||||
:instance_uuid_format => '[instance: %(uuid)s] ',
|
||||
:log_date_format => '%Y-%m-%d %H:%M:%S',
|
||||
:use_syslog => false,
|
||||
:use_stderr => false,
|
||||
:syslog_log_facility => 'LOG_USER',
|
||||
:log_dir => '/var/log',
|
||||
@ -53,6 +54,7 @@ describe 'neutron::logging' do
|
||||
|
||||
shared_examples 'basic default logging settings' do
|
||||
it 'configures neutron logging settins with default values' do
|
||||
is_expected.to contain_neutron_config('DEFAULT/use_syslog').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_neutron_config('DEFAULT/use_stderr').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_neutron_config('DEFAULT/syslog_log_facility').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_neutron_config('DEFAULT/log_dir').with(:value => '/var/log/neutron')
|
||||
@ -64,6 +66,7 @@ describe 'neutron::logging' do
|
||||
|
||||
shared_examples 'basic non-default logging settings' do
|
||||
it 'configures neutron logging settins with non-default values' do
|
||||
is_expected.to contain_neutron_config('DEFAULT/use_syslog').with(:value => 'false')
|
||||
is_expected.to contain_neutron_config('DEFAULT/use_stderr').with(:value => 'false')
|
||||
is_expected.to contain_neutron_config('DEFAULT/syslog_log_facility').with(:value => 'LOG_USER')
|
||||
is_expected.to contain_neutron_config('DEFAULT/log_dir').with(:value => '/var/log')
|
||||
|
Loading…
x
Reference in New Issue
Block a user