]> review.fuel-infra Code Review - puppet-modules/puppet-ceilometer.git/commitdiff
Change notification ack_on_event_error to service default
authorTobias Urdin <tobias.urdin@binero.se>
Mon, 21 Oct 2019 15:13:11 +0000 (17:13 +0200)
committerTobias Urdin <tobias.urdin@binero.se>
Mon, 21 Oct 2019 15:13:11 +0000 (17:13 +0200)
The default value of ack_on_event_error is forced to true
which is unneccesary since the default value in ceilometer.conf
is true. Instead we should default to using the service default.

Change-Id: I8c287331d57cdd39eaa4faf83091f7532b6b6293

manifests/agent/notification.pp
releasenotes/notes/def-value-ack_on_event_error-1c98d2efc6a5098d.yaml [new file with mode: 0644]
spec/classes/ceilometer_agent_notification_spec.rb

index 792e6e79cf13589614edac9d274ee4f77bdb3678..a90f0af48c601025a47480da96041ee96f039523 100644 (file)
@@ -34,7 +34,7 @@
 #
 # [*ack_on_event_error*]
 #   (Optional) Acknowledge message when event persistence fails.
-#   Defaults to true.
+#   Defaults to $::os_service_default.
 #
 # [*disable_non_metric_meters*]
 #   (Optional) Disable or enable the collection of non-metric meters.
@@ -76,7 +76,7 @@
 class ceilometer::agent::notification (
   $manage_service            = true,
   $enabled                   = true,
-  $ack_on_event_error        = true,
+  $ack_on_event_error        = $::os_service_default,
   $disable_non_metric_meters = $::os_service_default,
   $notification_workers      = $::os_service_default,
   $messaging_urls            = $::os_service_default,
diff --git a/releasenotes/notes/def-value-ack_on_event_error-1c98d2efc6a5098d.yaml b/releasenotes/notes/def-value-ack_on_event_error-1c98d2efc6a5098d.yaml
new file mode 100644 (file)
index 0000000..f87761b
--- /dev/null
@@ -0,0 +1,5 @@
+---
+upgrade:
+  - |
+    The default value of ceilometer::agent::notification has been changed from
+    true to the service default (ack_on_event_error is true by default in ceilometer.conf).
index b9fdb5c341361545c5d91a586bf910ec9aae7a4e..83a5e4dfe97652ca1bd2ce42fcba2548a5086d2a 100644 (file)
@@ -28,8 +28,7 @@ describe 'ceilometer::agent::notification' do
 
   let :params do
     { :manage_service     => true,
-      :enabled            => true,
-      :ack_on_event_error => true }
+      :enabled            => true }
   end
 
   shared_examples_for 'ceilometer-agent-notification' do
@@ -46,7 +45,7 @@ describe 'ceilometer::agent::notification' do
 
     it 'configures notifications parameters in ceilometer.conf' do
       is_expected.to contain_ceilometer_config('notification/workers').with_value('<SERVICE DEFAULT>')
-      is_expected.to contain_ceilometer_config('notification/ack_on_event_error').with_value( params[:ack_on_event_error] )
+      is_expected.to contain_ceilometer_config('notification/ack_on_event_error').with_value('<SERVICE DEFAULT>')
       is_expected.to contain_ceilometer_config('notification/disable_non_metric_meters').with_value('<SERVICE DEFAULT>')
     end
 
@@ -192,6 +191,14 @@ describe 'ceilometer::agent::notification' do
       ) }
         it { is_expected.not_to contain_file('pipeline') }
     end
+
+    context 'with custom ack_on_event_error' do
+      before do
+        params.merge!( :ack_on_event_error => true )
+      end
+
+      it { is_expected.to contain_ceilometer_config('notification/ack_on_event_error').with_value(true) }
+    end
   end
 
   on_supported_os({