summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Klare <j.klare@cloudbau.de>2017-12-15 12:09:55 +0100
committerJan Klare <j.klare@cloudbau.de>2017-12-15 12:09:55 +0100
commit720ffcb9edac2d07830aae63a1350c8011884a49 (patch)
tree7a5c4b27315b7ceaa14588be099cbfba7abf01ba
parent88c718d574e993e350b90316e4edad205e6bf90b (diff)
disable ceilometer events when using gnocchi as backend
Notes
Notes (review): Code-Review+2: Christoph Albers <c.albers@x-ion.de> Code-Review+2: Samuel Cassiba <s@cassiba.com> Workflow+1: Samuel Cassiba <s@cassiba.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 22 Dec 2017 20:55:18 +0000 Reviewed-on: https://review.openstack.org/528232 Project: openstack/cookbook-openstack-telemetry Branch: refs/heads/master
-rw-r--r--files/event_pipeline.yaml3
-rw-r--r--recipes/gnocchi_configure.rb10
-rw-r--r--spec/gnocchi_configure_spec.rb10
3 files changed, 23 insertions, 0 deletions
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 @@
1---
2sources: []
3sinks: []
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-
77 mode 0o0640 77 mode 0o0640
78end 78end
79 79
80# drop event_pipeline.yaml to ceilometer folder (gnocchi does not use events and
81# the default event_pipeline.yaml will lead to a queue "event.sample" in rabbit
82# without a consumer)
83cookbook_file File.join(node['openstack']['telemetry']['conf_dir'], 'event_pipeline.yaml') do
84 source 'event_pipeline.yaml'
85 owner node['openstack']['telemetry']['user']
86 group node['openstack']['telemetry']['group']
87 mode 0o0640
88end
89
80if node['openstack']['telemetry-metric']['conf']['storage']['driver'] == 'file' 90if node['openstack']['telemetry-metric']['conf']['storage']['driver'] == 'file'
81 # default store is file, so create needed directories with correct permissions 91 # default store is file, so create needed directories with correct permissions
82 # (on ubuntu they are created by the package, but owned by root and not writable 92 # (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
82 ) 82 )
83 end 83 end
84 84
85 it do
86 expect(chef_run).to create_cookbook_file('/etc/ceilometer/event_pipeline.yaml')
87 .with(
88 source: 'event_pipeline.yaml',
89 owner: 'ceilometer',
90 group: 'ceilometer',
91 mode: 0o0640
92 )
93 end
94
85 %w(tmp measure cache).each do |dir| 95 %w(tmp measure cache).each do |dir|
86 describe "gnocchi #{dir} dir" do 96 describe "gnocchi #{dir} dir" do
87 context 'file as storage backend' do 97 context 'file as storage backend' do