From d361dbb4cd0be6dc61287c4a91cb028f1556b307 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 10 Mar 2025 18:36:32 +0900 Subject: [PATCH] Add support for [pooling] ignore_disabled_projects ... which was added during this cycle. Depends-on: https://review.opendev.org/934670 Change-Id: I6424527afc452621e207b1368b83af85db99a926 --- manifests/agent/polling.pp | 7 +++++++ .../notes/ignore_disabled_projects-5d27978bb56f0ef3.yaml | 5 +++++ spec/classes/ceilometer_agent_polling_spec.rb | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 releasenotes/notes/ignore_disabled_projects-5d27978bb56f0ef3.yaml diff --git a/manifests/agent/polling.pp b/manifests/agent/polling.pp index d6b656d6..6e142e34 100644 --- a/manifests/agent/polling.pp +++ b/manifests/agent/polling.pp @@ -86,6 +86,11 @@ # (Optional) Identify user and project names from polled metrics. # Defaults to $facts['os_service_default']. # +# [*ignore_disabled_projects*] +# (Optional) Whether the pooling service should ignore disabled projects or +# not. +# Defaults to $facts['os_service_default']. +# # [*enable_notifications*] # (Optional) Whether the polling service should be sending notifications. # Defaults to $facts['os_service_default']. @@ -123,6 +128,7 @@ class ceilometer::agent::polling ( $cfg_file = $facts['os_service_default'], $batch_size = $facts['os_service_default'], $tenant_name_discovery = $facts['os_service_default'], + $ignore_disabled_projects = $facts['os_service_default'], $enable_notifications = $facts['os_service_default'], $enable_prometheus_exporter = $facts['os_service_default'], $prometheus_listen_addresses = $facts['os_service_default'], @@ -238,6 +244,7 @@ class ceilometer::agent::polling ( ceilometer_config { 'polling/batch_size': value => $batch_size; 'polling/tenant_name_discovery': value => $tenant_name_discovery; + 'polling/ignore_disabled_projects': value => $ignore_disabled_projects; 'polling/pollsters_definitions_dirs': value => join(any2array($pollsters_definitions_dirs), ','); 'polling/enable_notifications': value => $enable_notifications; 'polling/enable_prometheus_exporter': value => $enable_prometheus_exporter; diff --git a/releasenotes/notes/ignore_disabled_projects-5d27978bb56f0ef3.yaml b/releasenotes/notes/ignore_disabled_projects-5d27978bb56f0ef3.yaml new file mode 100644 index 00000000..5dea73b4 --- /dev/null +++ b/releasenotes/notes/ignore_disabled_projects-5d27978bb56f0ef3.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``ceilometer::agent::polling::ignore_disabled_projects`` parameter + has been added. diff --git a/spec/classes/ceilometer_agent_polling_spec.rb b/spec/classes/ceilometer_agent_polling_spec.rb index 622ed0f0..813c0b7c 100644 --- a/spec/classes/ceilometer_agent_polling_spec.rb +++ b/spec/classes/ceilometer_agent_polling_spec.rb @@ -73,6 +73,7 @@ describe 'ceilometer::agent::polling' do it { should contain_ceilometer_config('polling/batch_size').with_value('') } it { should_not contain_file('polling') } it { should contain_ceilometer_config('polling/tenant_name_discovery').with_value('') } + it { should contain_ceilometer_config('polling/ignore_disabled_projects').with_value('') } it { should contain_ceilometer_config('polling/enable_notifications').with_value('') } it { should contain_ceilometer_config('polling/enable_prometheus_exporter').with_value('') } it { should contain_ceilometer_config('polling/prometheus_listen_addresses').with_value('') } @@ -110,6 +111,7 @@ describe 'ceilometer::agent::polling' do before do params.merge!( :tenant_name_discovery => true, + :ignore_disabled_projects => false, :enable_notifications => true, :enable_prometheus_exporter => false, :prometheus_listen_addresses => ['127.0.0.1:9101'], @@ -119,6 +121,7 @@ describe 'ceilometer::agent::polling' do it { should contain_ceilometer_config('polling/tenant_name_discovery').with_value(true) + should contain_ceilometer_config('polling/ignore_disabled_projects').with_value(false) should contain_ceilometer_config('polling/enable_notifications').with_value(true) should contain_ceilometer_config('polling/enable_prometheus_exporter').with_value(false) should contain_ceilometer_config('polling/prometheus_listen_addresses').with_value('127.0.0.1:9101')