Browse Source

disable ceilometer events when using gnocchi as backend

Change-Id: I0b9adc6a2ea8d5973c71152dd5d5efa3bbacf2a6
changes/32/528232/1
Jan Klare 1 year ago
parent
commit
720ffcb9ed
No account linked to committer's email address
3 changed files with 23 additions and 0 deletions
  1. 3
    0
      files/event_pipeline.yaml
  2. 10
    0
      recipes/gnocchi_configure.rb
  3. 10
    0
      spec/gnocchi_configure_spec.rb

+ 3
- 0
files/event_pipeline.yaml View File

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

+ 10
- 0
recipes/gnocchi_configure.rb View File

@@ -77,6 +77,16 @@ cookbook_file File.join(node['openstack']['telemetry-metric']['conf_dir'], 'api-
77 77
   mode 0o0640
78 78
 end
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)
83
+cookbook_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
88
+end
89
+
80 90
 if node['openstack']['telemetry-metric']['conf']['storage']['driver'] == 'file'
81 91
   # default store is file, so create needed directories with correct permissions
82 92
   # (on ubuntu they are created by the package, but owned by root and not writable

+ 10
- 0
spec/gnocchi_configure_spec.rb View File

@@ -82,6 +82,16 @@ describe 'openstack-telemetry::gnocchi_configure' do
82 82
         )
83 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 95
     %w(tmp measure cache).each do |dir|
86 96
       describe "gnocchi #{dir} dir" do
87 97
         context 'file as storage backend' do

Loading…
Cancel
Save