Revert "Nova Deprecation"

This commit partially reverts original commit.

use_syslog option is not deprecated and still actual.

This reverts commit 9abc7531a94a7f8b983f93be426dbed3c7697e8d

Change-Id: I0bc443124077b663a9c9d85a0bf2772f476ae170
This commit is contained in:
Iury Gregory Melo Ferreira
2016-05-31 11:39:24 -03:00
parent 13d6327fd8
commit 8b94037a60
4 changed files with 16 additions and 19 deletions

View File

@@ -250,6 +250,10 @@
# (optional) Path to the rootwrap configuration file to use for running commands as root # (optional) Path to the rootwrap configuration file to use for running commands as root
# Defaults to '/etc/nova/rootwrap.conf' # Defaults to '/etc/nova/rootwrap.conf'
# #
# [*use_syslog*]
# (optional) Use syslog for logging
# Defaults to undef
#
# [*use_stderr*] # [*use_stderr*]
# (optional) Use stderr for logging # (optional) Use stderr for logging
# Defaults to undef # Defaults to undef
@@ -377,10 +381,6 @@
# (optional) Set log output to verbose output. # (optional) Set log output to verbose output.
# Defaults to undef # Defaults to undef
# #
# [*use_syslog*]
# (optional) Deprecated. Use syslog for logging
# Defaults to undef
#
class nova( class nova(
$ensure_package = 'present', $ensure_package = 'present',
$database_connection = undef, $database_connection = undef,
@@ -448,6 +448,7 @@ class nova(
$key_file = false, $key_file = false,
$nova_public_key = undef, $nova_public_key = undef,
$nova_private_key = undef, $nova_private_key = undef,
$use_syslog = undef,
$use_stderr = undef, $use_stderr = undef,
$log_facility = undef, $log_facility = undef,
$notification_driver = $::os_service_default, $notification_driver = $::os_service_default,
@@ -469,7 +470,6 @@ class nova(
$purge_config = false, $purge_config = false,
# DEPRECATED PARAMETERS # DEPRECATED PARAMETERS
$verbose = undef, $verbose = undef,
$use_syslog = undef,
) inherits nova::params { ) inherits nova::params {
include ::nova::deps include ::nova::deps
@@ -487,10 +487,6 @@ class nova(
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.') warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
} }
if $use_syslog {
warning('use_syslog parameter is deprecated, has no effect and will be removed in a future release.')
}
if $use_ssl { if $use_ssl {
if !$cert_file { if !$cert_file {
fail('The cert_file parameter is required when use_ssl is set to true') fail('The cert_file parameter is required when use_ssl is set to true')

View File

@@ -8,6 +8,10 @@
# (Optional) Should the daemons log debug messages # (Optional) Should the daemons log debug messages
# Defaults to $::os_service_default # Defaults to $::os_service_default
# #
# [*use_syslog*]
# (Optional) Use syslog for logging.
# Defaults to $::os_service_default
#
# [*use_stderr*] # [*use_stderr*]
# (optional) Use stderr for logging # (optional) Use stderr for logging
# Defaults to $::os_service_default # Defaults to $::os_service_default
@@ -88,11 +92,8 @@
# DEPRECATED: Parameter has no effect # DEPRECATED: Parameter has no effect
# Defaults to undef # Defaults to undef
# #
# [*use_syslog*]
# (Optional) DEPRECATED. Use syslog for logging.
# Defaults to undef
#
class nova::logging( class nova::logging(
$use_syslog = $::os_service_default,
$use_stderr = $::os_service_default, $use_stderr = $::os_service_default,
$log_facility = $::os_service_default, $log_facility = $::os_service_default,
$log_dir = '/var/log/nova', $log_dir = '/var/log/nova',
@@ -110,13 +111,13 @@ class nova::logging(
$log_date_format = $::os_service_default, $log_date_format = $::os_service_default,
# DEPRECATED PARAMETERS # DEPRECATED PARAMETERS
$verbose = undef, $verbose = undef,
$use_syslog = undef,
) { ) {
include ::nova::deps include ::nova::deps
# NOTE(spredzy): In order to keep backward compatibility we rely on the pick function # NOTE(spredzy): In order to keep backward compatibility we rely on the pick function
# to use nova::<myparam> first then nova::logging::<myparam>. # to use nova::<myparam> first then nova::logging::<myparam>.
$use_syslog_real = pick($::nova::use_syslog,$use_syslog)
$use_stderr_real = pick($::nova::use_stderr,$use_stderr) $use_stderr_real = pick($::nova::use_stderr,$use_stderr)
$log_facility_real = pick($::nova::log_facility,$log_facility) $log_facility_real = pick($::nova::log_facility,$log_facility)
$log_dir_real = pick($::nova::log_dir,$log_dir) $log_dir_real = pick($::nova::log_dir,$log_dir)
@@ -126,13 +127,10 @@ class nova::logging(
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.') 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.')
}
oslo::log { 'nova_config': oslo::log { 'nova_config':
debug => $debug_real, debug => $debug_real,
use_stderr => $use_stderr_real, use_stderr => $use_stderr_real,
use_syslog => $use_syslog_real,
log_dir => $log_dir_real, log_dir => $log_dir_real,
syslog_log_facility => $log_facility_real, syslog_log_facility => $log_facility_real,
logging_context_format_string => $logging_context_format_string, logging_context_format_string => $logging_context_format_string,

View File

@@ -3,6 +3,6 @@ deprecations:
- libvirt remove_unused_kernels, cells manager - libvirt remove_unused_kernels, cells manager
are deprecated. They have no effect and will be removed in a future are deprecated. They have no effect and will be removed in a future
release. release.
- DEFAULT use_syslog/network_device_mtu/compute_manager - DEFAULT network_device_mtu/compute_manager
are deprecated. Only compute_manager has effect, because Ironic use. are deprecated. Only compute_manager has effect, because Ironic use.
They will be removed in a future release. They will be removed in a future release.

View File

@@ -23,6 +23,7 @@ describe 'nova::logging' do
:instance_format => '[instance: %(uuid)s] ', :instance_format => '[instance: %(uuid)s] ',
:instance_uuid_format => '[instance: %(uuid)s] ', :instance_uuid_format => '[instance: %(uuid)s] ',
:log_date_format => '%Y-%m-%d %H:%M:%S', :log_date_format => '%Y-%m-%d %H:%M:%S',
:use_syslog => true,
:use_stderr => false, :use_stderr => false,
:log_facility => 'LOG_FOO', :log_facility => 'LOG_FOO',
:log_dir => '/var/log', :log_dir => '/var/log',
@@ -54,6 +55,7 @@ describe 'nova::logging' do
shared_examples 'basic default logging settings' do shared_examples 'basic default logging settings' do
it 'configures nova logging settins with default values' do it 'configures nova logging settins with default values' do
is_expected.to contain_nova_config('DEFAULT/use_syslog').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/use_stderr').with(:value => '<SERVICE DEFAULT>') is_expected.to contain_nova_config('DEFAULT/use_stderr').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/log_dir').with(:value => '/var/log/nova') is_expected.to contain_nova_config('DEFAULT/log_dir').with(:value => '/var/log/nova')
is_expected.to contain_nova_config('DEFAULT/debug').with(:value => '<SERVICE DEFAULT>') is_expected.to contain_nova_config('DEFAULT/debug').with(:value => '<SERVICE DEFAULT>')
@@ -62,6 +64,7 @@ describe 'nova::logging' do
shared_examples 'basic non-default logging settings' do shared_examples 'basic non-default logging settings' do
it 'configures nova logging settins with non-default values' do it 'configures nova logging settins with non-default values' do
is_expected.to contain_nova_config('DEFAULT/use_syslog').with(:value => 'true')
is_expected.to contain_nova_config('DEFAULT/use_stderr').with(:value => 'false') is_expected.to contain_nova_config('DEFAULT/use_stderr').with(:value => 'false')
is_expected.to contain_nova_config('DEFAULT/syslog_log_facility').with(:value => 'LOG_FOO') is_expected.to contain_nova_config('DEFAULT/syslog_log_facility').with(:value => 'LOG_FOO')
is_expected.to contain_nova_config('DEFAULT/log_dir').with(:value => '/var/log') is_expected.to contain_nova_config('DEFAULT/log_dir').with(:value => '/var/log')