Merge "disable ceilometer events when using gnocchi as backend"

This commit is contained in:
Zuul 2017-12-22 20:55:18 +00:00 committed by Gerrit Code Review
commit d480d8801f
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