diff --git a/files/event_pipeline.yaml b/files/event_pipeline.yaml new file mode 100644 index 0000000..9053801 --- /dev/null +++ b/files/event_pipeline.yaml @@ -0,0 +1,3 @@ +--- +sources: [] +sinks: [] diff --git a/recipes/gnocchi_configure.rb b/recipes/gnocchi_configure.rb index 99cb7f1..90389a5 100644 --- a/recipes/gnocchi_configure.rb +++ b/recipes/gnocchi_configure.rb @@ -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 diff --git a/spec/gnocchi_configure_spec.rb b/spec/gnocchi_configure_spec.rb index 5b772d2..59aeb19 100644 --- a/spec/gnocchi_configure_spec.rb +++ b/spec/gnocchi_configure_spec.rb @@ -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