diff --git a/Berksfile.lock b/Berksfile.lock index 89f7478..308084b 100644 --- a/Berksfile.lock +++ b/Berksfile.lock @@ -2,8 +2,8 @@ "sha": "ba71763fac936d414bd4a63f004357f86f6e1bfb", "sources": { "openstack-block-storage": { - "locked_version": "7.0.0", - "constraint": "= 7.0.0", + "locked_version": "7.0.1", + "constraint": "= 7.0.1", "path": "." }, "openstack-image": { diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..2762a8b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +openstack-block-storage Cookbook CHANGELOG +============================== +This file is used to list changes made in each version of the openstack-block-storage cookbook. + + +v7.0.1 +------ +### Improvement +- Add audit cronjob and enable control_exchange, when metering enabled diff --git a/metadata.rb b/metadata.rb index b4ef529..b8a4a53 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ maintainer_email "cookbooks@lists.tfoundry.com" license "Apache 2.0" description "The OpenStack Advanced Volume Management service Cinder." long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version "7.0.0" +version "7.0.1" recipe "openstack-block-storage::common", "Defines the common pieces of repeated code from the other recipes" recipe "openstack-block-storage::api", "Installs the cinder-api, sets up the cinder database, and cinder service/user/endpoints in keystone" diff --git a/recipes/scheduler.rb b/recipes/scheduler.rb index 6055ada..a092fdd 100644 --- a/recipes/scheduler.rb +++ b/recipes/scheduler.rb @@ -54,3 +54,11 @@ service "cinder-scheduler" do action [ :enable, :start ] subscribes :restart, "template[/etc/cinder/cinder.conf]" end + +if node["openstack"]["metering"] + cron "cinder-volume-usage-audit" do + command "cinder-volume-usage-audit > /var/log/cinder/audit.log 2>&1" + action :create + user node["openstack"]["block-storage"]["user"] + end +end diff --git a/templates/default/cinder.conf.erb b/templates/default/cinder.conf.erb index 677970a..fb6fecf 100644 --- a/templates/default/cinder.conf.erb +++ b/templates/default/cinder.conf.erb @@ -170,6 +170,9 @@ auth_strategy=keystone #### (StrOpt) The strategy to use for auth. Supports noauth, keystone, and #### deprecated. +<% if node["openstack"]["block-storage"]["rabbit"]["control_exchange"] %> +control_exchange=<%=node["openstack"]["block-storage"]["rabbit"]["control_exchange"]%> +<% end %> # control_exchange=cinder #### (StrOpt) AMQP exchange to connect to if using RabbitMQ or Qpid