disable ceilometer events when using gnocchi as backend

Change-Id: I0b9adc6a2ea8d5973c71152dd5d5efa3bbacf2a6
This commit is contained in:
Jan Klare 2017-12-15 12:09:55 +01:00
parent 88c718d574
commit 720ffcb9ed
No known key found for this signature in database
GPG Key ID: 1F8C347A7DC77FD2
3 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,3 @@
---
sources: []
sinks: []

View File

@ -77,6 +77,16 @@ cookbook_file File.join(node['openstack']['telemetry-metric']['conf_dir'], 'api-
mode 0o0640
end
# drop event_pipeline.yaml to ceilometer folder (gnocchi does not use events and
# the default event_pipeline.yaml will lead to a queue "event.sample" in rabbit
# without a consumer)
cookbook_file File.join(node['openstack']['telemetry']['conf_dir'], 'event_pipeline.yaml') do
source 'event_pipeline.yaml'
owner node['openstack']['telemetry']['user']
group node['openstack']['telemetry']['group']
mode 0o0640
end
if node['openstack']['telemetry-metric']['conf']['storage']['driver'] == 'file'
# default store is file, so create needed directories with correct permissions
# (on ubuntu they are created by the package, but owned by root and not writable

View File

@ -82,6 +82,16 @@ describe 'openstack-telemetry::gnocchi_configure' do
)
end
it do
expect(chef_run).to create_cookbook_file('/etc/ceilometer/event_pipeline.yaml')
.with(
source: 'event_pipeline.yaml',
owner: 'ceilometer',
group: 'ceilometer',
mode: 0o0640
)
end
%w(tmp measure cache).each do |dir|
describe "gnocchi #{dir} dir" do
context 'file as storage backend' do