From be524d2b74ad61fd208a505980af00fefe37022c Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Wed, 26 Sep 2018 17:25:01 +0200 Subject: [PATCH] Volume discovery minimum 3.43 api version Set the volume api version to 3.43 to make sure we get 3.41 change where it exposes the user_id for snapshots. This will fix the volume.snapshot.size metric that is not working when trying to access the user_id throws a AttributeError. Change-Id: I2414717e7c9e64b0092fe93c97a062a48dbf09a8 Closes-Bug: 1794475 --- ceilometer/volume/discovery.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ceilometer/volume/discovery.py b/ceilometer/volume/discovery.py index 65c84348b2..eefa36dec0 100644 --- a/ceilometer/volume/discovery.py +++ b/ceilometer/volume/discovery.py @@ -28,8 +28,10 @@ class _BaseDiscovery(plugin_base.DiscoveryBase): def __init__(self, conf): super(_BaseDiscovery, self).__init__(conf) creds = conf.service_credentials + # NOTE(tobias-urdin): We set 3.43 (the maximum for Pike) because + # we need atleast 3.41 to get user_id on snapshots. self.client = cinder_client.Client( - version='3', + version='3.43', session=keystone_client.get_session(conf), region_name=creds.region_name, interface=creds.interface,