Browse Source

Remove deprecated logging

Change-Id: I6cdcfd0eb37444fc7e0fa02c4d875dd28537d6b9
tags/14.2.0
Tobias Urdin 5 months ago
parent
commit
2b5f6bc87a

+ 0
- 27
manifests/init.pp View File

@@ -8,15 +8,6 @@
8 8
 #    (Optional) Ensure state for package.
9 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 11
 # [*default_transport_url*]
21 12
 #   (optional) A URL representing the messaging driver to use and its full
22 13
 #   configuration. Transport URLs take the form:
@@ -220,18 +211,6 @@
220 211
 #   (optional) If set, use this value for max_overflow with sqlalchemy.
221 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 214
 # [*flavor*]
236 215
 #   (optional) Specifies the Authentication method.
237 216
 #   Set to 'standalone' to get Heat to work with a remote OpenStack
@@ -294,8 +273,6 @@
294 273
 #
295 274
 class heat(
296 275
   $package_ensure                     = 'present',
297
-  $debug                              = undef,
298
-  $log_dir                            = undef,
299 276
   $keystone_ec2_uri                   = $::os_service_default,
300 277
   $default_transport_url              = $::os_service_default,
301 278
   $rpc_response_timeout               = $::os_service_default,
@@ -329,9 +306,6 @@ class heat(
329 306
   $amqp_username                      = $::os_service_default,
330 307
   $amqp_password                      = $::os_service_default,
331 308
   $host                               = $::os_service_default,
332
-  $use_syslog                         = undef,
333
-  $use_stderr                         = undef,
334
-  $log_facility                       = undef,
335 309
   $database_connection                = undef,
336 310
   $database_max_retries               = undef,
337 311
   $database_idle_timeout              = undef,
@@ -359,7 +333,6 @@ class heat(
359 333
   $yaql_limit_iterators               = $::os_service_default,
360 334
 ) {
361 335
 
362
-  include ::heat::logging
363 336
   include ::heat::db
364 337
   include ::heat::deps
365 338
   include ::heat::params

+ 5
- 17
manifests/logging.pp View File

@@ -116,28 +116,16 @@ class heat::logging(
116 116
 
117 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 119
   oslo::log { 'heat_config':
132
-    debug                         => $debug_real,
120
+    debug                         => $debug,
133 121
     log_config_append             => $log_config_append,
134 122
     log_date_format               => $log_date_format,
135
-    log_dir                       => $log_dir_real,
136
-    use_syslog                    => $use_syslog_real,
123
+    log_dir                       => $log_dir,
124
+    use_syslog                    => $use_syslog,
137 125
     use_json                      => $use_json,
138 126
     use_journal                   => $use_journal,
139
-    syslog_log_facility           => $log_facility_real,
140
-    use_stderr                    => $use_stderr_real,
127
+    syslog_log_facility           => $log_facility,
128
+    use_stderr                    => $use_stderr,
141 129
     logging_context_format_string => $logging_context_format_string,
142 130
     logging_default_format_string => $logging_default_format_string,
143 131
     logging_debug_format_suffix   => $logging_debug_format_suffix,

+ 5
- 0
releasenotes/notes/remove-deprecated-logging-2994ab3b4ae7a560.yaml View File

@@ -0,0 +1,5 @@
1
+---
2
+upgrade:
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.

+ 0
- 4
spec/classes/heat_init_spec.rb View File

@@ -10,9 +10,6 @@ describe 'heat' do
10 10
   let :params do
11 11
     {
12 12
       :package_ensure        => 'present',
13
-      :debug                 => 'False',
14
-      :use_stderr            => 'True',
15
-      :log_dir               => '/var/log/heat',
16 13
       :database_connection   => 'mysql+pymysql://user@host/database',
17 14
       :database_idle_timeout => 3600,
18 15
       :flavor                => 'keystone',
@@ -57,7 +54,6 @@ describe 'heat' do
57 54
 
58 55
   shared_examples_for 'a heat base installation' do
59 56
 
60
-    it { is_expected.to contain_class('heat::logging') }
61 57
     it { is_expected.to contain_class('heat::params') }
62 58
 
63 59
     it 'installs heat common package' do

Loading…
Cancel
Save