Remove deprecated logging
Change-Id: I2c0bc7906a165f26b21a3283636409f75cfdb30a
This commit is contained in:
parent
07ed82e319
commit
19036bf75c
|
@ -29,10 +29,6 @@
|
||||||
# (optional) The state of the package
|
# (optional) The state of the package
|
||||||
# Defaults to 'present'
|
# Defaults to 'present'
|
||||||
#
|
#
|
||||||
# [*debug*]
|
|
||||||
# (optional) Print debug messages in the logs
|
|
||||||
# Defaults to False
|
|
||||||
#
|
|
||||||
# [*my_ip*]
|
# [*my_ip*]
|
||||||
# (optional) IP address of this host.
|
# (optional) IP address of this host.
|
||||||
# If unset, will determine the IP programmatically. If unable to do so, will use
|
# If unset, will determine the IP programmatically. If unable to do so, will use
|
||||||
|
@ -189,23 +185,6 @@
|
||||||
# (Optional) Password for message broker authentication
|
# (Optional) Password for message broker authentication
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
# [*use_syslog*]
|
|
||||||
# (optional) Use syslog for logging
|
|
||||||
# Defaults to undef.
|
|
||||||
#
|
|
||||||
# [*log_facility*]
|
|
||||||
# (optional) Syslog facility to receive log lines
|
|
||||||
# Defaults to undef.
|
|
||||||
#
|
|
||||||
# [*use_stderr*]
|
|
||||||
# (optional) Use stderr for logging
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
# [*database_connection*]
|
# [*database_connection*]
|
||||||
# (optional) Connection url for the ironic database.
|
# (optional) Connection url for the ironic database.
|
||||||
# Defaults to: undef
|
# Defaults to: undef
|
||||||
|
@ -273,12 +252,7 @@
|
||||||
class ironic (
|
class ironic (
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$debug = undef,
|
|
||||||
$my_ip = $::os_service_default,
|
$my_ip = $::os_service_default,
|
||||||
$use_syslog = undef,
|
|
||||||
$use_stderr = undef,
|
|
||||||
$log_facility = undef,
|
|
||||||
$log_dir = undef,
|
|
||||||
$auth_strategy = 'keystone',
|
$auth_strategy = 'keystone',
|
||||||
$default_resource_class = $::os_service_default,
|
$default_resource_class = $::os_service_default,
|
||||||
$control_exchange = $::os_service_default,
|
$control_exchange = $::os_service_default,
|
||||||
|
@ -330,7 +304,6 @@ class ironic (
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::ironic::deps
|
include ::ironic::deps
|
||||||
include ::ironic::logging
|
|
||||||
include ::ironic::db
|
include ::ironic::db
|
||||||
include ::ironic::params
|
include ::ironic::params
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,9 @@
|
||||||
# (optional) Protocol to be used for transferring the ramdisk
|
# (optional) Protocol to be used for transferring the ramdisk
|
||||||
# Defaults to 'tftp'. Valid values are 'tftp' or 'http'.
|
# Defaults to 'tftp'. Valid values are 'tftp' or 'http'.
|
||||||
#
|
#
|
||||||
# [*debug*]
|
# [*dhcp_debug*]
|
||||||
# (optional) Enable debug logging
|
# (optional) Boolean to enable dnsmasq debug logging.
|
||||||
# Defaults to undef
|
# Defaults to false
|
||||||
#
|
#
|
||||||
# [*auth_strategy*]
|
# [*auth_strategy*]
|
||||||
# (optional) API authentication strategy: keystone or noauth
|
# (optional) API authentication strategy: keystone or noauth
|
||||||
|
@ -231,12 +231,18 @@
|
||||||
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
|
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
|
||||||
# Defaults to 'fake://'
|
# Defaults to 'fake://'
|
||||||
#
|
#
|
||||||
|
## DEPRECATED PARAMS
|
||||||
|
#
|
||||||
|
# [*debug*]
|
||||||
|
# (optional) Enable debug logging
|
||||||
|
# Defaults to undef
|
||||||
|
#
|
||||||
class ironic::inspector (
|
class ironic::inspector (
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$listen_address = $::os_service_default,
|
$listen_address = $::os_service_default,
|
||||||
$pxe_transfer_protocol = 'tftp',
|
$pxe_transfer_protocol = 'tftp',
|
||||||
$debug = undef,
|
$dhcp_debug = false,
|
||||||
$auth_strategy = 'keystone',
|
$auth_strategy = 'keystone',
|
||||||
$timeout = $::os_service_default,
|
$timeout = $::os_service_default,
|
||||||
$dnsmasq_interface = 'br-ctlplane',
|
$dnsmasq_interface = 'br-ctlplane',
|
||||||
|
@ -280,12 +286,13 @@ class ironic::inspector (
|
||||||
$discovery_default_driver = $::os_service_default,
|
$discovery_default_driver = $::os_service_default,
|
||||||
$enable_ppc64le = false,
|
$enable_ppc64le = false,
|
||||||
$default_transport_url = 'fake://',
|
$default_transport_url = 'fake://',
|
||||||
|
## DEPRECATED PARAMS
|
||||||
|
$debug = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::ironic::deps
|
include ::ironic::deps
|
||||||
include ::ironic::params
|
include ::ironic::params
|
||||||
include ::ironic::pxe::common
|
include ::ironic::pxe::common
|
||||||
include ::ironic::inspector::logging
|
|
||||||
include ::ironic::inspector::db
|
include ::ironic::inspector::db
|
||||||
|
|
||||||
if $auth_strategy == 'keystone' {
|
if $auth_strategy == 'keystone' {
|
||||||
|
@ -296,6 +303,10 @@ class ironic::inspector (
|
||||||
fail('Invalid data type, parameter dnsmasq_ip_subnets must be Array type')
|
fail('Invalid data type, parameter dnsmasq_ip_subnets must be Array type')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# TODO(tobias-urdin): When debug is removed make sure this is removed
|
||||||
|
# and change dhcp_debug_real to dhcp_debug in the erb templates.
|
||||||
|
$dhcp_debug_real = pick($debug, $dhcp_debug)
|
||||||
|
|
||||||
$tftp_root_real = pick($::ironic::pxe::common::tftp_root, $tftp_root)
|
$tftp_root_real = pick($::ironic::pxe::common::tftp_root, $tftp_root)
|
||||||
$http_root_real = pick($::ironic::pxe::common::http_root, $http_root)
|
$http_root_real = pick($::ironic::pxe::common::http_root, $http_root)
|
||||||
$http_port_real = pick($::ironic::pxe::common::http_port, $http_port)
|
$http_port_real = pick($::ironic::pxe::common::http_port, $http_port)
|
||||||
|
|
|
@ -111,10 +111,8 @@ class ironic::inspector::logging(
|
||||||
|
|
||||||
include ::ironic::deps
|
include ::ironic::deps
|
||||||
|
|
||||||
$debug_real = pick($::ironic::inspector::debug,$debug)
|
|
||||||
|
|
||||||
oslo::log { 'ironic_inspector_config':
|
oslo::log { 'ironic_inspector_config':
|
||||||
debug => $debug_real,
|
debug => $debug,
|
||||||
use_stderr => $use_stderr,
|
use_stderr => $use_stderr,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
use_json => $use_json,
|
use_json => $use_json,
|
||||||
|
|
|
@ -116,26 +116,14 @@ class ironic::logging(
|
||||||
|
|
||||||
include ::ironic::deps
|
include ::ironic::deps
|
||||||
|
|
||||||
# NOTE(spredzy): In order to keep backward compatibility we rely on the pick function
|
|
||||||
# to use ironic::<myparam> first then ironic::logging::<myparam>.
|
|
||||||
$use_syslog_real = pick($::ironic::use_syslog,$use_syslog)
|
|
||||||
$use_stderr_real = pick($::ironic::use_stderr,$use_stderr)
|
|
||||||
$log_facility_real = pick($::ironic::log_facility,$log_facility)
|
|
||||||
if $log_dir != '' {
|
|
||||||
$log_dir_real = pick($::ironic::log_dir,$log_dir)
|
|
||||||
} else {
|
|
||||||
$log_dir_real = $log_dir
|
|
||||||
}
|
|
||||||
$debug_real = pick($::ironic::debug,$debug)
|
|
||||||
|
|
||||||
oslo::log { 'ironic_config':
|
oslo::log { 'ironic_config':
|
||||||
debug => $debug_real,
|
debug => $debug,
|
||||||
use_stderr => $use_stderr_real,
|
use_stderr => $use_stderr,
|
||||||
use_syslog => $use_syslog_real,
|
use_syslog => $use_syslog,
|
||||||
use_json => $use_json,
|
use_json => $use_json,
|
||||||
use_journal => $use_journal,
|
use_journal => $use_journal,
|
||||||
log_dir => $log_dir_real,
|
log_dir => $log_dir,
|
||||||
syslog_log_facility => $log_facility_real,
|
syslog_log_facility => $log_facility,
|
||||||
logging_context_format_string => $logging_context_format_string,
|
logging_context_format_string => $logging_context_format_string,
|
||||||
logging_default_format_string => $logging_default_format_string,
|
logging_default_format_string => $logging_default_format_string,
|
||||||
logging_debug_format_suffix => $logging_debug_format_suffix,
|
logging_debug_format_suffix => $logging_debug_format_suffix,
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
ironic::inspector::dhcp_debug has been added and should be set to enable
|
||||||
|
dnsmasq debug logging.
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
The deprecated parameters use_syslog, use_stderr, log_facility, log_dir and
|
||||||
|
debug in the ::ironic class is now removed. Please set them in ::ironic::logging
|
||||||
|
instead.
|
||||||
|
- |
|
||||||
|
ironic::inspector::logging is not included in ironic::inspector by default, you
|
||||||
|
should define it to set logging options for the inspector.
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
ironic::inspector::debug is deprecated will be removed.
|
||||||
|
Please set ironic::inspector::logging::debug to enable debug logging and/or set
|
||||||
|
ironic::inspector::dhcp_debug to enable dnsmasq debugging.
|
|
@ -24,7 +24,6 @@ describe 'ironic' do
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{ :package_ensure => 'present',
|
{ :package_ensure => 'present',
|
||||||
:debug => false,
|
|
||||||
:database_connection => 'sqlite:////var/lib/ironic/ironic.sqlite',
|
:database_connection => 'sqlite:////var/lib/ironic/ironic.sqlite',
|
||||||
:database_max_retries => 10,
|
:database_max_retries => 10,
|
||||||
:database_idle_timeout => 3600,
|
:database_idle_timeout => 3600,
|
||||||
|
@ -63,7 +62,6 @@ describe 'ironic' do
|
||||||
|
|
||||||
shared_examples_for 'a ironic base installation' do
|
shared_examples_for 'a ironic base installation' do
|
||||||
|
|
||||||
it { is_expected.to contain_class('ironic::logging') }
|
|
||||||
it { is_expected.to contain_class('ironic::params') }
|
it { is_expected.to contain_class('ironic::params') }
|
||||||
|
|
||||||
it { is_expected.to contain_class('ironic::glance') }
|
it { is_expected.to contain_class('ironic::glance') }
|
||||||
|
|
|
@ -70,7 +70,6 @@ describe 'ironic::inspector' do
|
||||||
end
|
end
|
||||||
|
|
||||||
it { is_expected.to contain_class('ironic::params') }
|
it { is_expected.to contain_class('ironic::params') }
|
||||||
it { is_expected.to contain_class('ironic::inspector::logging') }
|
|
||||||
|
|
||||||
it 'installs ironic inspector package' do
|
it 'installs ironic inspector package' do
|
||||||
if platform_params.has_key?(:inspector_package)
|
if platform_params.has_key?(:inspector_package)
|
||||||
|
@ -176,7 +175,7 @@ describe 'ironic::inspector' do
|
||||||
context 'when overriding parameters' do
|
context 'when overriding parameters' do
|
||||||
before :each do
|
before :each do
|
||||||
params.merge!(
|
params.merge!(
|
||||||
:debug => true,
|
:dhcp_debug => true,
|
||||||
:listen_address => '127.0.0.1',
|
:listen_address => '127.0.0.1',
|
||||||
:ironic_password => 'password',
|
:ironic_password => 'password',
|
||||||
:ironic_project_domain_name => 'Default',
|
:ironic_project_domain_name => 'Default',
|
||||||
|
@ -202,7 +201,6 @@ describe 'ironic::inspector' do
|
||||||
end
|
end
|
||||||
it 'should replace default parameter with new value' do
|
it 'should replace default parameter with new value' do
|
||||||
is_expected.to contain_ironic_inspector_config('DEFAULT/listen_address').with_value(p[:listen_address])
|
is_expected.to contain_ironic_inspector_config('DEFAULT/listen_address').with_value(p[:listen_address])
|
||||||
is_expected.to contain_ironic_inspector_config('DEFAULT/debug').with_value(p[:debug])
|
|
||||||
is_expected.to contain_ironic_inspector_config('capabilities/boot_mode').with_value(p[:detect_boot_mode])
|
is_expected.to contain_ironic_inspector_config('capabilities/boot_mode').with_value(p[:detect_boot_mode])
|
||||||
is_expected.to contain_ironic_inspector_config('ironic/password').with_value(p[:ironic_password]).with_secret(true)
|
is_expected.to contain_ironic_inspector_config('ironic/password').with_value(p[:ironic_password]).with_secret(true)
|
||||||
is_expected.to contain_ironic_inspector_config('ironic/project_domain_name').with_value(p[:ironic_project_domain_name])
|
is_expected.to contain_ironic_inspector_config('ironic/project_domain_name').with_value(p[:ironic_project_domain_name])
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
port=0
|
port=0
|
||||||
interface=<%= @dnsmasq_interface %>
|
interface=<%= @dnsmasq_interface %>
|
||||||
<% if @debug %>
|
<% if @dhcp_debug_real %>
|
||||||
log-dhcp
|
log-dhcp
|
||||||
log-queries
|
log-queries
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
port=0
|
port=0
|
||||||
interface=<%= @dnsmasq_interface %>
|
interface=<%= @dnsmasq_interface %>
|
||||||
<% if @debug %>
|
<% if @dhcp_debug_real %>
|
||||||
log-dhcp
|
log-dhcp
|
||||||
log-queries
|
log-queries
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in New Issue