cinder/cinder
Gorka Eguileor 8469109016 RBD: Fix stats reporting
Current RBD code is incorrectly reporting the stats of the pool in the
following ways:

- `provisioned_capacity_gb` contains physical space used by cinder created
  volumes.
- `free_capacity_gb` is not taking into account that pools can have quota
  restrictions and they should be used as the reference for the free capacity.
- `total_capacity` dynamically changes, which means that there is no way to
  have a fixed over provisioning capacity.

This patch fixes the stats reporting making sure we return the right
values in `provisioned_capacity_gb` and `free_capacity_gb`, and allows
us to use a static calculation of the `total_capacity` using
`report_dynamic_total_capacity` configuration option.

We don't report `allocated_capacity_gb` because this is something that
is calculated by the Cinder core code and should not be reported by
drivers, even if it's not currently working as expected [1][2].

[1] https://bugs.launchpad.net/cinder/+bug/1712549
[2] https://bugs.launchpad.net/cinder/+bug/1706057

Change-Id: I1e82bf9d0b6cc0fb1d1fc2dd8b8ccc59aea3f73f
Closes-Bug: #1706060
2017-08-23 14:33:27 +02:00
..
api Merge "Clean up repl v1 volume creation from replication" 2017-08-18 16:49:40 +00:00
backup Merge "cinder backup sets incorrect parent_id" 2017-08-09 06:31:35 +00:00
brick LVM: Activate LV before creating exports 2017-07-21 11:22:31 -04:00
cmd Sort cinder-manage commands 2017-08-01 13:45:00 -04:00
common Add service dynamic log change/query 2017-05-16 13:37:35 +02:00
compute [DOC BLD FIX] Fix formatting in cinder.compute.nova 2017-07-17 16:09:06 -05:00
config Move driver options to "backend_defaults" section 2017-07-03 16:42:03 +02:00
consistencygroup Merge "Add quota limit check and enhance roll back for cg create" 2017-03-20 13:13:08 +00:00
db Make attachment_update set status to attaching 2017-08-14 13:55:15 +00:00
group Do not delete group if group snapshot exists 2017-07-21 08:33:03 +08:00
hacking Globalize regex objects 2017-07-12 03:00:37 -04:00
image Merge "Mapping parallel and ploop" 2017-08-01 19:16:44 +00:00
interface Merge "Add driver interface documentation for list manageable" 2017-08-16 02:33:29 +00:00
keymgr Remove key_manager.api_class hack 2017-07-19 20:18:56 +00:00
locale Imported Translations from Zanata 2016-10-15 07:34:30 +00:00
message Fix typo in message for volume creation failure 2017-07-27 14:14:04 -04:00
objects Merge "Add group to cluster when init host" 2017-08-01 19:20:40 +00:00
scheduler Update backend state when extending volume 2017-07-27 17:25:11 +08:00
tests RBD: Fix stats reporting 2017-08-23 14:33:27 +02:00
transfer Trivial fix typos while reading code 2017-05-04 10:27:57 +07:00
volume RBD: Fix stats reporting 2017-08-23 14:33:27 +02:00
wsgi Remove unused logging import and LOG global var 2016-05-20 17:17:38 +08:00
zonemanager Merge "[DOC BLD FIX] Fix code block issues" 2017-07-23 01:12:19 +00:00
__init__.py Set EVENTLET_NO_GREENDNS for IPv6 and dnspython compat 2016-11-11 13:19:07 -06:00
context.py Remove log translations 2017-03-19 14:59:57 +00:00
coordination.py coordination: use tooz builtin heartbeat feature 2017-07-19 07:17:50 -04:00
exception.py Merge "Fix message format for VolumeAttachmentNotFound exception" 2017-08-07 23:58:32 +00:00
flow_utils.py Fix logging traceback in service logs 2016-12-20 12:39:07 +05:30
i18n.py Remove log translations 2017-03-19 14:59:57 +00:00
manager.py Remove periodic_tasks method from base manager 2017-07-06 12:26:40 +03:00
opts.py Remove dothill driver options 2017-07-12 09:34:47 -05:00
policy.py Use to_policy_values for enforcing policy 2016-09-13 01:13:15 +00:00
quota.py Periodic task to clean expired reservation 2017-05-30 22:21:38 +08:00
quota_utils.py Add Generic Volume Group Into Quota Management 2017-05-26 01:43:23 +00:00
rpc.py Remove deprecated oslo_messaging.get_transport 2017-06-13 14:25:38 +07:00
service.py Remove periodic_tasks method from base manager 2017-07-06 12:26:40 +03:00
ssh_utils.py Fix SSHPool current_size not work correctly 2017-07-11 10:58:20 +08:00
test.py Load resource filter config file in testcase 2017-08-08 10:33:09 +08:00
utils.py Fix python 3.6 escape char warnings in strings 2017-07-11 17:04:54 -04:00
version.py