Dont include logging in init by default
Change-Id: Ia59a7d52f5d2fdc4387b3653b8bef956a832c761
This commit is contained in:
@@ -8,28 +8,6 @@
|
|||||||
# (optional) The state of gnocchi packages
|
# (optional) The state of gnocchi packages
|
||||||
# Defaults to 'present'
|
# Defaults to 'present'
|
||||||
#
|
#
|
||||||
# [*log_dir*]
|
|
||||||
# (optional) Directory where logs should be stored.
|
|
||||||
# If set to boolean false or the $::os_service_default, it will not log to
|
|
||||||
# any directory.
|
|
||||||
# Defaults to undef
|
|
||||||
#
|
|
||||||
# [*debug*]
|
|
||||||
# (optional) Set log output to debug output.
|
|
||||||
# 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
|
|
||||||
#
|
|
||||||
# [*database_connection*]
|
# [*database_connection*]
|
||||||
# (optional) Connection url for the gnocchi database.
|
# (optional) Connection url for the gnocchi database.
|
||||||
# Defaults to undef.
|
# Defaults to undef.
|
||||||
@@ -41,18 +19,12 @@
|
|||||||
#
|
#
|
||||||
class gnocchi (
|
class gnocchi (
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$debug = undef,
|
|
||||||
$use_syslog = undef,
|
|
||||||
$use_stderr = undef,
|
|
||||||
$log_dir = undef,
|
|
||||||
$log_facility = undef,
|
|
||||||
$database_connection = undef,
|
$database_connection = undef,
|
||||||
$purge_config = false,
|
$purge_config = false,
|
||||||
) inherits gnocchi::params {
|
) inherits gnocchi::params {
|
||||||
|
|
||||||
include ::gnocchi::deps
|
include ::gnocchi::deps
|
||||||
include ::gnocchi::db
|
include ::gnocchi::db
|
||||||
include ::gnocchi::logging
|
|
||||||
|
|
||||||
package { 'gnocchi':
|
package { 'gnocchi':
|
||||||
ensure => $package_ensure,
|
ensure => $package_ensure,
|
||||||
|
@@ -46,26 +46,14 @@ class gnocchi::logging(
|
|||||||
|
|
||||||
include ::gnocchi::deps
|
include ::gnocchi::deps
|
||||||
|
|
||||||
# note(spredzy): in order to keep backward compatibility we rely on the pick function
|
|
||||||
# to use gnocchi::<myparam> first then gnocchi::logging::<myparam>.
|
|
||||||
$use_syslog_real = pick($::gnocchi::use_syslog,$use_syslog)
|
|
||||||
$use_stderr_real = pick($::gnocchi::use_stderr,$use_stderr)
|
|
||||||
$log_facility_real = pick($::gnocchi::log_facility,$log_facility)
|
|
||||||
if $log_dir != '' {
|
|
||||||
$log_dir_real = pick($::gnocchi::log_dir,$log_dir)
|
|
||||||
} else {
|
|
||||||
$log_dir_real = $log_dir
|
|
||||||
}
|
|
||||||
$debug_real = pick($::gnocchi::debug,$debug)
|
|
||||||
|
|
||||||
oslo::log { 'gnocchi_config':
|
oslo::log { 'gnocchi_config':
|
||||||
debug => $debug_real,
|
debug => $debug,
|
||||||
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,
|
||||||
use_stderr => $use_stderr_real,
|
use_stderr => $use_stderr,
|
||||||
log_dir => $log_dir_real,
|
log_dir => $log_dir,
|
||||||
syslog_log_facility => $log_facility_real,
|
syslog_log_facility => $log_facility,
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
gnocchi::logging is now not included in init class by default.
|
@@ -9,9 +9,8 @@ describe 'gnocchi' do
|
|||||||
{ :purge_config => false }
|
{ :purge_config => false }
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'contains the logging class' do
|
it 'contains the deps class' do
|
||||||
is_expected.to contain_class('gnocchi::deps')
|
is_expected.to contain_class('gnocchi::deps')
|
||||||
is_expected.to contain_class('gnocchi::logging')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'installs packages' do
|
it 'installs packages' do
|
||||||
|
Reference in New Issue
Block a user