From fa541f72fd78942c49a903b376a58bf959b93097 Mon Sep 17 00:00:00 2001 From: mbuege Date: Mon, 19 Dec 2016 10:46:13 +0100 Subject: [PATCH] ceilometer-api and gnocchi-api need to be disabled on Ubuntu Change-Id: I76622053bd792c70b84f1cf358e7ab118ef23390 --- recipes/api.rb | 6 ++++++ recipes/gnocchi_install.rb | 5 +++++ spec/api_spec.rb | 4 ++++ spec/gnocchi_install_spec.rb | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/recipes/api.rb b/recipes/api.rb index 0861c3b..749c299 100644 --- a/recipes/api.rb +++ b/recipes/api.rb @@ -36,6 +36,12 @@ platform['api_packages'].each do |pkg| action :upgrade end end +# stop and disable the service ceilometer-api itself, since it should be run inside +# of apache +service platform['api_service'] do + action [:stop, :disable] +end + bind_service = node['openstack']['bind_service']['all']['telemetry'] bind_service_address = bind_address bind_service #### Start of Apache specific work diff --git a/recipes/gnocchi_install.rb b/recipes/gnocchi_install.rb index abc5422..e0e412a 100644 --- a/recipes/gnocchi_install.rb +++ b/recipes/gnocchi_install.rb @@ -25,3 +25,8 @@ platform['gnocchi_packages'].each do |pkg| version '2.0.2-4' end end +# stop and disable the service gnocchi-api_service itself, since it should be run inside +# of apache +service platform['gnocchi-api_service'] do + action [:stop, :disable] +end diff --git a/spec/api_spec.rb b/spec/api_spec.rb index 86ba7c1..21f97d2 100644 --- a/spec/api_spec.rb +++ b/spec/api_spec.rb @@ -13,6 +13,10 @@ describe 'openstack-telemetry::api' do it 'installs the api package' do expect(chef_run).to upgrade_package 'ceilometer-api' end + it do + expect(chef_run).to stop_service('ceilometer-api') + expect(chef_run).to disable_service('ceilometer-api') + end describe 'apache recipes' do it 'include apache recipes' do diff --git a/spec/gnocchi_install_spec.rb b/spec/gnocchi_install_spec.rb index 96792de..bf11113 100644 --- a/spec/gnocchi_install_spec.rb +++ b/spec/gnocchi_install_spec.rb @@ -14,6 +14,11 @@ describe 'openstack-telemetry::gnocchi_install' do expect(chef_run).to install_package 'gnocchi-api' end + it do + expect(chef_run).to stop_service('gnocchi-api') + expect(chef_run).to disable_service('gnocchi-api') + end + it do expect(chef_run).to install_package 'gnocchi-metricd' end