From b34ede31d4830ddb12acfc064abee8b4e0b4686a Mon Sep 17 00:00:00 2001
From: ZhongShengping <chdzsp@163.com>
Date: Mon, 11 Jul 2016 17:33:32 +0800
Subject: [PATCH] Enable Block Storage meters

Use [oslo_messaging_notifications]/driver option in cinder.conf
to enable block storage meters, set the option default value is
'messagingv2'.

Change-Id: I1e885324fbeb2ad1c547c6c6618cbacd0e441d51
Closes-Bug: 1602055
---
 ansible/roles/cinder/templates/cinder.conf.j2                | 5 +++++
 .../notes/support-ceilometer-in-cinder-4386a3e5d134d84f.yaml | 4 ++++
 2 files changed, 9 insertions(+)
 create mode 100644 releasenotes/notes/support-ceilometer-in-cinder-4386a3e5d134d84f.yaml

diff --git a/ansible/roles/cinder/templates/cinder.conf.j2 b/ansible/roles/cinder/templates/cinder.conf.j2
index 77449814c9..a20182497d 100644
--- a/ansible/roles/cinder/templates/cinder.conf.j2
+++ b/ansible/roles/cinder/templates/cinder.conf.j2
@@ -42,6 +42,11 @@ nova_catalog_info = compute:nova:internalURL
 
 auth_strategy = keystone
 
+[oslo_messaging_notifications]
+{% if enable_ceilometer | bool %}
+driver = messagingv2
+{% endif %}
+
 [database]
 connection = mysql+pymysql://{{ cinder_database_user }}:{{ cinder_database_password }}@{{ cinder_database_address }}/{{ cinder_database_name }}
 max_retries = -1
diff --git a/releasenotes/notes/support-ceilometer-in-cinder-4386a3e5d134d84f.yaml b/releasenotes/notes/support-ceilometer-in-cinder-4386a3e5d134d84f.yaml
new file mode 100644
index 0000000000..ef64e092b0
--- /dev/null
+++ b/releasenotes/notes/support-ceilometer-in-cinder-4386a3e5d134d84f.yaml
@@ -0,0 +1,4 @@
+---
+features:
+  - Use [oslo_messaging_notifications]/driver option in cinder.conf
+    to enable block storage meters.