From 75f614b12312e7709329362e4f42e760e8be4a5a Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Mon, 21 Oct 2019 17:13:11 +0200 Subject: [PATCH] Change notification ack_on_event_error to service default 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 | 4 ++-- ...f-value-ack_on_event_error-1c98d2efc6a5098d.yaml | 5 +++++ spec/classes/ceilometer_agent_notification_spec.rb | 13 ++++++++++--- 3 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 releasenotes/notes/def-value-ack_on_event_error-1c98d2efc6a5098d.yaml diff --git a/manifests/agent/notification.pp b/manifests/agent/notification.pp index 792e6e7..a90f0af 100644 --- a/manifests/agent/notification.pp +++ b/manifests/agent/notification.pp @@ -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 index 0000000..f87761b --- /dev/null +++ b/releasenotes/notes/def-value-ack_on_event_error-1c98d2efc6a5098d.yaml @@ -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). diff --git a/spec/classes/ceilometer_agent_notification_spec.rb b/spec/classes/ceilometer_agent_notification_spec.rb index b9fdb5c..83a5e4d 100644 --- a/spec/classes/ceilometer_agent_notification_spec.rb +++ b/spec/classes/ceilometer_agent_notification_spec.rb @@ -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('') - 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('') is_expected.to contain_ceilometer_config('notification/disable_non_metric_meters').with_value('') 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({ -- 2.45.2