Add support for ignore_projects for ceilometer events
Set the default to services tenant. Without this, ceilometer db gets hammered with gnocchi swift events. Keystone creds are required so middleware can qwuery for id. This support is added in https://review.openstack.org/#/c/464559/ Change-Id: I5c0f4f1a2c7fe7eb39ea6441970e9ac0946a4ec1 (cherry picked from commit28cbb68958
) (cherry picked from commit182d55d712
)
This commit is contained in:
parent
1d4afc04b4
commit
f5fdfd7b60
|
@ -58,6 +58,42 @@
|
|||
# Whether to send events to messaging driver in a background thread
|
||||
# Defaults to false
|
||||
#
|
||||
# [*ignore_projects*]
|
||||
# What projects to ignore to send events to ceilometer
|
||||
# Defaults to ['services']
|
||||
#
|
||||
# [*auth_uri*]
|
||||
# (Optional) Complete public Identity API endpoint.
|
||||
# Defaults to 'http://127.0.0.1:5000'
|
||||
#
|
||||
# [*auth_url*]
|
||||
# (Optional) The URL to use for authentication.
|
||||
# Defaults to 'http://127.0.0.1:35357'
|
||||
#
|
||||
# [*auth_type*]
|
||||
# (Optional) The plugin for authentication
|
||||
# Defaults to 'password'
|
||||
#
|
||||
# [*project_name*]
|
||||
# (Optional) Service project name
|
||||
# Defaults to 'services'
|
||||
#
|
||||
# [*project_domain_name*]
|
||||
# (Optional) name of domain for $project_name
|
||||
# Defaults to 'default'
|
||||
#
|
||||
# [*user_domain_name*]
|
||||
# (Optional) name of domain for $username
|
||||
# Defaults to 'default'
|
||||
#
|
||||
# [*username*]
|
||||
# (Optional) The name of the service user
|
||||
# Defaults to 'swift'
|
||||
#
|
||||
# [*password*]
|
||||
# (Optional) The password for the user
|
||||
# Defaults to 'password'
|
||||
#
|
||||
# == Examples
|
||||
#
|
||||
# == Authors
|
||||
|
@ -81,6 +117,15 @@ class swift::proxy::ceilometer(
|
|||
$ensure = 'present',
|
||||
$group = 'ceilometer',
|
||||
$nonblocking_notify = false,
|
||||
$ignore_projects = ['services'],
|
||||
$auth_uri = 'http://127.0.0.1:5000',
|
||||
$auth_url = 'http://127.0.0.1:35357',
|
||||
$auth_type = 'password',
|
||||
$project_domain_name = 'Default',
|
||||
$user_domain_name = 'Default',
|
||||
$project_name = 'services',
|
||||
$username = 'swift',
|
||||
$password = 'password',
|
||||
) inherits swift {
|
||||
|
||||
include ::swift::deps
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
fixes:
|
||||
- Add ignore projects setting to filter:ceilometer in proxy server config.
|
|
@ -33,6 +33,15 @@ describe 'swift::proxy::ceilometer' do
|
|||
:topic => 'notifications',
|
||||
:control_exchange => 'swift',
|
||||
:nonblocking_notify => true,
|
||||
:ignore_projects => 'services',
|
||||
:auth_uri => 'http://127.0.0.1:5000',
|
||||
:auth_url => 'http://127.0.0.1:35357',
|
||||
:auth_type => 'password',
|
||||
:project_domain_name => 'Default',
|
||||
:user_domain_name => 'Default',
|
||||
:project_name => 'services',
|
||||
:username => 'swift',
|
||||
:password => 'password',
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -45,6 +54,15 @@ describe 'swift::proxy::ceilometer' do
|
|||
it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/topic = notifications/) }
|
||||
it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/control_exchange = swift/) }
|
||||
it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/nonblocking_notify = true/) }
|
||||
it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/ignore_projects = services/) }
|
||||
it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/auth_uri = http:\/\/127.0.0.1:5000/) }
|
||||
it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/auth_url = http:\/\/127.0.0.1:35357/) }
|
||||
it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/auth_type = password/) }
|
||||
it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/project_domain_name = Default/) }
|
||||
it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/user_domain_name = Default/) }
|
||||
it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/project_name = services/) }
|
||||
it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/username = swift/) }
|
||||
it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/password = password/) }
|
||||
end
|
||||
|
||||
context 'with multiple rabbit hosts' do
|
||||
|
|
|
@ -19,3 +19,30 @@ control_exchange = <%= @control_exchange %>
|
|||
<% if @nonblocking_notify %>
|
||||
nonblocking_notify = <%= @nonblocking_notify %>
|
||||
<% end %>
|
||||
<% if @ignore_projects %>
|
||||
ignore_projects = <%= @ignore_projects %>
|
||||
<% end %>
|
||||
<% if @auth_uri %>
|
||||
auth_uri = <%= @auth_uri %>
|
||||
<% end %>
|
||||
<% if @auth_url %>
|
||||
auth_url = <%= @auth_url %>
|
||||
<% end %>
|
||||
<% if @auth_type %>
|
||||
auth_type = <%= @auth_type %>
|
||||
<% end %>
|
||||
<% if @project_name %>
|
||||
project_name = <%= @project_name %>
|
||||
<% end %>
|
||||
<% if @project_domain_name %>
|
||||
project_domain_name = <%= @project_domain_name %>
|
||||
<% end %>
|
||||
<% if @user_domain_name %>
|
||||
user_domain_name = <%= @user_domain_name %>
|
||||
<% end %>
|
||||
<% if @username %>
|
||||
username = <%= @username %>
|
||||
<% end %>
|
||||
<% if @password %>
|
||||
password = <%= @password %>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue