diff --git a/CHANGELOG.md b/CHANGELOG.md index b457a5d..d22a8a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ openstack-metering Cookbook CHANGELOG ============================== This file is used to list changes made in each version of the openstack-metering cookbook. +## 8.2.0 +### Blueprint +* Add NoSQL support for metering. + ## 8.1.0 * Add client recipe diff --git a/README.md b/README.md index aef6cc0..2572b1c 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ client collector ---- -- Installs nova network service. +- Installs collector package and service. If the NoSQL database is used for metering service, ceilometer-dbsync will not be executed. common ---- diff --git a/metadata.rb b/metadata.rb index 03f998e..b1b8bcc 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,13 +4,13 @@ maintainer_email 'cookbooks@lists.tfoundry.com' license 'Apache 2.0' description 'The OpenStack Metering service Ceilometer.' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '8.1.0' +version '8.2.0' recipe 'openstack-metering::agent-central', 'Installs agent central service.' recipe 'openstack-metering::agent-compute', 'Installs agent compute service.' recipe 'openstack-metering::api', 'Installs API service.' recipe 'openstack-metering::client', 'Installs client.' -recipe 'openstack-metering::collector', 'Installs nova network service.' +recipe 'openstack-metering::collector', 'Installs collector service. If the NoSQL database is used for metering service, ceilometer-dbsync will not be executed.' recipe 'openstack-metering::common', 'Common metering configuration.' recipe 'openstack-metering::identity_registration', 'Registers the endpoints with Keystone' diff --git a/recipes/collector.rb b/recipes/collector.rb index 5a342a4..8e6b64e 100644 --- a/recipes/collector.rb +++ b/recipes/collector.rb @@ -24,8 +24,10 @@ include_recipe 'openstack-metering::common' conf_switch = "--config-file #{node["openstack"]["metering"]["conf"]}" -execute 'database migration' do - command "ceilometer-dbsync #{conf_switch}" +unless node['openstack']['db']['metering']['nosql']['used'] + execute 'database migration' do + command "ceilometer-dbsync #{conf_switch}" + end end platform = node['openstack']['metering']['platform'] diff --git a/spec/collector_spec.rb b/spec/collector_spec.rb index 70d1bc1..1d1e93c 100644 --- a/spec/collector_spec.rb +++ b/spec/collector_spec.rb @@ -16,6 +16,12 @@ describe 'openstack-metering::collector' do expect(@chef_run).to run_execute command end + it 'does not execute ceilometer dbsync when nosql database is used' do + @chef_run.node.set['openstack']['db']['metering']['nosql']['used'] = true + resource = 'execute[database migration]' + expect(@chef_run).not_to run_execute resource + end + it 'installs python-mysqldb', A: true do expect(@chef_run).to install_package 'python-mysqldb' end