summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Urdin <tobias.urdin@binero.se>2018-11-29 10:29:44 +0100
committerTobias Urdin <tobias.urdin@binero.se>2018-11-29 10:29:44 +0100
commit2b5f6bc87a74c754ae0eaecd2fbf39cb54b1f179 (patch)
tree71456e587c6f0c132df035fcc347dc21d5083a00
parentd8e1123122e767f64a42c859015eb99eef1eef6c (diff)
Remove deprecated logging
Notes
Notes (review): Code-Review+2: Emilien Macchi <emilien@redhat.com> Code-Review+2: zhongshengping <chdzsp@163.com> Workflow+1: zhongshengping <chdzsp@163.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 12 Dec 2018 04:02:41 +0000 Reviewed-on: https://review.openstack.org/620842 Project: openstack/puppet-heat Branch: refs/heads/master
-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 c71929b..349e04b 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
@@ -294,8 +273,6 @@
294# 273#
295class heat( 274class heat(
296 $package_ensure = 'present', 275 $package_ensure = 'present',
297 $debug = undef,
298 $log_dir = undef,
299 $keystone_ec2_uri = $::os_service_default, 276 $keystone_ec2_uri = $::os_service_default,
300 $default_transport_url = $::os_service_default, 277 $default_transport_url = $::os_service_default,
301 $rpc_response_timeout = $::os_service_default, 278 $rpc_response_timeout = $::os_service_default,
@@ -329,9 +306,6 @@ class heat(
329 $amqp_username = $::os_service_default, 306 $amqp_username = $::os_service_default,
330 $amqp_password = $::os_service_default, 307 $amqp_password = $::os_service_default,
331 $host = $::os_service_default, 308 $host = $::os_service_default,
332 $use_syslog = undef,
333 $use_stderr = undef,
334 $log_facility = undef,
335 $database_connection = undef, 309 $database_connection = undef,
336 $database_max_retries = undef, 310 $database_max_retries = undef,
337 $database_idle_timeout = undef, 311 $database_idle_timeout = undef,
@@ -359,7 +333,6 @@ class heat(
359 $yaql_limit_iterators = $::os_service_default, 333 $yaql_limit_iterators = $::os_service_default,
360) { 334) {
361 335
362 include ::heat::logging
363 include ::heat::db 336 include ::heat::db
364 include ::heat::deps 337 include ::heat::deps
365 include ::heat::params 338 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 b00a920..cd81608 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