From 6941231059b868e32db72e640d04dcd3b8183f96 Mon Sep 17 00:00:00 2001 From: Liao Penghui Date: Wed, 13 Jan 2016 00:34:27 +0800 Subject: [PATCH] Move workers options into specific sections. The notification_workers/api_workers/collector_workers options are deprecated and should be set in [notification]/[api]/[collector] sections separately. Closes-Bug: #1533276 Change-Id: If1816830affd9de71ae5ee7bc2869eee7eaf8473 --- manifests/agent/notification.pp | 2 +- manifests/api.pp | 2 +- manifests/collector.pp | 4 ++-- spec/classes/ceilometer_agent_notification_spec.rb | 2 +- spec/classes/ceilometer_api_spec.rb | 2 +- spec/classes/ceilometer_collector_spec.rb | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/manifests/agent/notification.pp b/manifests/agent/notification.pp index d4ad89a7..ac8ccb78 100644 --- a/manifests/agent/notification.pp +++ b/manifests/agent/notification.pp @@ -97,7 +97,7 @@ class ceilometer::agent::notification ( 'notification/ack_on_event_error' : value => $ack_on_event_error; 'notification/store_events' : value => $store_events; 'notification/disable_non_metric_meters': value => $disable_non_metric_meters; - 'DEFAULT/notification_workers' : value => $notification_workers; + 'notification/workers' : value => $notification_workers; } } diff --git a/manifests/api.pp b/manifests/api.pp index 03a545e0..847fa2e9 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -128,7 +128,7 @@ class ceilometer::api ( } ceilometer_config { - 'DEFAULT/api_workers' : value => $api_workers; + 'api/workers' : value => $api_workers; 'keystone_authtoken/admin_tenant_name' : value => $keystone_tenant; 'keystone_authtoken/admin_user' : value => $keystone_user; 'keystone_authtoken/admin_password' : value => $keystone_password, secret => true; diff --git a/manifests/collector.pp b/manifests/collector.pp index 419307f6..5ca39e66 100644 --- a/manifests/collector.pp +++ b/manifests/collector.pp @@ -45,9 +45,9 @@ class ceilometer::collector ( $package_ensure = 'present', $udp_address = '0.0.0.0', $udp_port = '4952', + $collector_workers = $::os_service_default, $meter_dispatcher = 'database', $event_dispatcher = 'database', - $collector_workers = $::os_service_default, ) { include ::ceilometer::params @@ -63,9 +63,9 @@ class ceilometer::collector ( ceilometer_config { 'collector/udp_address': value => $udp_address; 'collector/udp_port': value => $udp_port; + 'collector/workers': value => $collector_workers; 'DEFAULT/meter_dispatcher': value => join(any2array($meter_dispatcher), ','); 'DEFAULT/event_dispatcher': value => join(any2array($event_dispatcher), ','); - 'DEFAULT/collector_workers': value => $collector_workers; } Package[$::ceilometer::params::collector_package_name] -> Service['ceilometer-collector'] diff --git a/spec/classes/ceilometer_agent_notification_spec.rb b/spec/classes/ceilometer_agent_notification_spec.rb index dbcde79b..1a552a0e 100644 --- a/spec/classes/ceilometer_agent_notification_spec.rb +++ b/spec/classes/ceilometer_agent_notification_spec.rb @@ -45,7 +45,7 @@ describe 'ceilometer::agent::notification' do end it 'configures notifications parameters in ceilometer.conf' do - is_expected.to contain_ceilometer_config('DEFAULT/notification_workers').with_value('') + 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/store_events').with_value( params[:store_events] ) is_expected.to contain_ceilometer_config('notification/disable_non_metric_meters').with_value('') diff --git a/spec/classes/ceilometer_api_spec.rb b/spec/classes/ceilometer_api_spec.rb index 2471cf25..064fd182 100644 --- a/spec/classes/ceilometer_api_spec.rb +++ b/spec/classes/ceilometer_api_spec.rb @@ -46,7 +46,7 @@ describe 'ceilometer::api' do is_expected.to contain_ceilometer_config('keystone_authtoken/identity_uri').with_value("http://127.0.0.1:35357/") is_expected.to contain_ceilometer_config('api/host').with_value( params[:host] ) is_expected.to contain_ceilometer_config('api/port').with_value( params[:port] ) - is_expected.to contain_ceilometer_config('DEFAULT/api_workers').with_value('') + is_expected.to contain_ceilometer_config('api/workers').with_value('') end [{:enabled => true}, {:enabled => false}].each do |param_hash| diff --git a/spec/classes/ceilometer_collector_spec.rb b/spec/classes/ceilometer_collector_spec.rb index 4c680fdf..b1752f7a 100644 --- a/spec/classes/ceilometer_collector_spec.rb +++ b/spec/classes/ceilometer_collector_spec.rb @@ -53,9 +53,9 @@ describe 'ceilometer::collector' do it 'configures ceilometer-collector server' do is_expected.to contain_ceilometer_config('collector/udp_address').with_value( '0.0.0.0' ) is_expected.to contain_ceilometer_config('collector/udp_port').with_value( '4952' ) + is_expected.to contain_ceilometer_config('collector/workers').with_value('') is_expected.to contain_ceilometer_config('DEFAULT/meter_dispatcher').with_value( 'database' ) is_expected.to contain_ceilometer_config('DEFAULT/event_dispatcher').with_value( 'database' ) - is_expected.to contain_ceilometer_config('DEFAULT/collector_workers').with_value('') end it 'installs ceilometer-collector package' do