summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-12-12 04:02:41 +0000
committerGerrit Code Review <review@openstack.org>2018-12-12 04:02:41 +0000
commitee43f289d8c15696c0ef011fea97d215e965031b (patch)
tree12fbb6a412b9818d1ff0473284b830443f5b2156
parent3274b3bff725f0e95d8ce211291f1c9c9115dc0e (diff)
parent2b5f6bc87a74c754ae0eaecd2fbf39cb54b1f179 (diff)
Merge "Remove deprecated logging"
-rw-r--r--manifests/init.pp27
-rw-r--r--manifests/logging.pp22
-rw-r--r--releasenotes/notes/remove-deprecated-logging-2994ab3b4ae7a560.yaml5
-rw-r--r--spec/classes/heat_init_spec.rb4
4 files changed, 10 insertions, 48 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 936bdc6..c14805c 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -8,15 +8,6 @@
8# (Optional) Ensure state for package. 8# (Optional) Ensure state for package.
9# Defaults to 'present' 9# Defaults to 'present'
10# 10#
11# [*debug*]
12# (Optional) Should the daemons log debug messages
13# Defaults to undef.
14#
15# [*log_dir*]
16# (Optional) Directory where logs should be stored
17# If set to $::os_service_default, it will not log to any directory
18# Defaults to undef.
19#
20# [*default_transport_url*] 11# [*default_transport_url*]
21# (optional) A URL representing the messaging driver to use and its full 12# (optional) A URL representing the messaging driver to use and its full
22# configuration. Transport URLs take the form: 13# configuration. Transport URLs take the form:
@@ -220,18 +211,6 @@
220# (optional) If set, use this value for max_overflow with sqlalchemy. 211# (optional) If set, use this value for max_overflow with sqlalchemy.
221# Defaults to: undef. 212# Defaults to: undef.
222 213
223# [*use_syslog*]
224# (Optional) Use syslog for logging.
225# Defaults to undef.
226#
227# [*use_stderr*]
228# (optional) Use stderr for logging
229# Defaults to undef.
230#
231# [*log_facility*]
232# (Optional) Syslog facility to receive log lines.
233# Defaults to undef.
234#
235# [*flavor*] 214# [*flavor*]
236# (optional) Specifies the Authentication method. 215# (optional) Specifies the Authentication method.
237# Set to 'standalone' to get Heat to work with a remote OpenStack 216# Set to 'standalone' to get Heat to work with a remote OpenStack
@@ -296,8 +275,6 @@
296# 275#
297class heat( 276class heat(
298 $package_ensure = 'present', 277 $package_ensure = 'present',
299 $debug = undef,
300 $log_dir = undef,
301 $keystone_ec2_uri = $::os_service_default, 278 $keystone_ec2_uri = $::os_service_default,
302 $default_transport_url = $::os_service_default, 279 $default_transport_url = $::os_service_default,
303 $rpc_response_timeout = $::os_service_default, 280 $rpc_response_timeout = $::os_service_default,
@@ -331,9 +308,6 @@ class heat(
331 $amqp_username = $::os_service_default, 308 $amqp_username = $::os_service_default,
332 $amqp_password = $::os_service_default, 309 $amqp_password = $::os_service_default,
333 $host = $::os_service_default, 310 $host = $::os_service_default,
334 $use_syslog = undef,
335 $use_stderr = undef,
336 $log_facility = undef,
337 $database_connection = undef, 311 $database_connection = undef,
338 $database_max_retries = undef, 312 $database_max_retries = undef,
339 $database_idle_timeout = undef, 313 $database_idle_timeout = undef,
@@ -362,7 +336,6 @@ class heat(
362 $heat_clients_keystone_uri = undef, 336 $heat_clients_keystone_uri = undef,
363) { 337) {
364 338
365 include ::heat::logging
366 include ::heat::db 339 include ::heat::db
367 include ::heat::deps 340 include ::heat::deps
368 include ::heat::params 341 include ::heat::params
diff --git a/manifests/logging.pp b/manifests/logging.pp
index 1b5b3fc..bb165de 100644
--- a/manifests/logging.pp
+++ b/manifests/logging.pp
@@ -116,28 +116,16 @@ class heat::logging(
116 116
117 include ::heat::deps 117 include ::heat::deps
118 118
119 # NOTE(spredzy): In order to keep backward compatibility we rely on the pick function
120 # to use heat::<myparam> first then heat::logging::<myparam>.
121 $use_syslog_real = pick($::heat::use_syslog,$use_syslog)
122 $use_stderr_real = pick($::heat::use_stderr,$use_stderr)
123 $log_facility_real = pick($::heat::log_facility,$log_facility)
124 if $log_dir != '' {
125 $log_dir_real = pick($::heat::log_dir,$log_dir)
126 } else {
127 $log_dir_real = $log_dir
128 }
129 $debug_real = pick($::heat::debug,$debug)
130
131 oslo::log { 'heat_config': 119 oslo::log { 'heat_config':
132 debug => $debug_real, 120 debug => $debug,
133 log_config_append => $log_config_append, 121 log_config_append => $log_config_append,
134 log_date_format => $log_date_format, 122 log_date_format => $log_date_format,
135 log_dir => $log_dir_real, 123 log_dir => $log_dir,
136 use_syslog => $use_syslog_real, 124 use_syslog => $use_syslog,
137 use_json => $use_json, 125 use_json => $use_json,
138 use_journal => $use_journal, 126 use_journal => $use_journal,
139 syslog_log_facility => $log_facility_real, 127 syslog_log_facility => $log_facility,
140 use_stderr => $use_stderr_real, 128 use_stderr => $use_stderr,
141 logging_context_format_string => $logging_context_format_string, 129 logging_context_format_string => $logging_context_format_string,
142 logging_default_format_string => $logging_default_format_string, 130 logging_default_format_string => $logging_default_format_string,
143 logging_debug_format_suffix => $logging_debug_format_suffix, 131 logging_debug_format_suffix => $logging_debug_format_suffix,
diff --git a/releasenotes/notes/remove-deprecated-logging-2994ab3b4ae7a560.yaml b/releasenotes/notes/remove-deprecated-logging-2994ab3b4ae7a560.yaml
new file mode 100644
index 0000000..83979a5
--- /dev/null
+++ b/releasenotes/notes/remove-deprecated-logging-2994ab3b4ae7a560.yaml
@@ -0,0 +1,5 @@
1---
2upgrade:
3 - |
4 The deprecated parameters use_syslog, use_stderr, log_facility, log_dir and
5 debug in the init class is now removed. Please set them in the logging class.
diff --git a/spec/classes/heat_init_spec.rb b/spec/classes/heat_init_spec.rb
index 1132186..c8cb9a1 100644
--- a/spec/classes/heat_init_spec.rb
+++ b/spec/classes/heat_init_spec.rb
@@ -10,9 +10,6 @@ describe 'heat' do
10 let :params do 10 let :params do
11 { 11 {
12 :package_ensure => 'present', 12 :package_ensure => 'present',
13 :debug => 'False',
14 :use_stderr => 'True',
15 :log_dir => '/var/log/heat',
16 :database_connection => 'mysql+pymysql://user@host/database', 13 :database_connection => 'mysql+pymysql://user@host/database',
17 :database_idle_timeout => 3600, 14 :database_idle_timeout => 3600,
18 :flavor => 'keystone', 15 :flavor => 'keystone',
@@ -57,7 +54,6 @@ describe 'heat' do
57 54
58 shared_examples_for 'a heat base installation' do 55 shared_examples_for 'a heat base installation' do
59 56
60 it { is_expected.to contain_class('heat::logging') }
61 it { is_expected.to contain_class('heat::params') } 57 it { is_expected.to contain_class('heat::params') }
62 58
63 it 'installs heat common package' do 59 it 'installs heat common package' do