summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2017-12-22 20:55:18 +0000
committerGerrit Code Review <review@openstack.org>2017-12-22 20:55:18 +0000
commitd480d8801f423e13d74a8d175c1ba1f777d12b35 (patch)
tree44d1aca067f5763ac592231988d8637ad39c4023
parentb1c74d581ef0425d6cc48e98d623e0183a42603f (diff)
parent720ffcb9edac2d07830aae63a1350c8011884a49 (diff)
Merge "disable ceilometer events when using gnocchi as backend"
-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 19919f2..81025d8 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