Backend/volume capacity metrics documented as GB but is actually GiB

Bug #2129711 reported by Callum Dickinson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
New
Undecided
Unassigned

Bug Description

The Cinder API for listing backend storage pools documents that the capacity fields (total_capacity_gb and free_capacity_gb) are in gigabytes (GB) [1].

It appears that within the drivers however, these metrics are actually reported in **gibibytes (GiB)** [2] [3] [4] [5].

The Cinder capacity notifications (capacity.backend.* and capacity.pool.*) use the same methods for its metrics, so are also affected.

I'm assuming that changing the names of total_capacity_gb and free_capacity_gb is too disruptive (would require a new microversion and, if the existing names are deprecated, clients that consume this would need to change the references), and that's fair. I do think the following needs to be done, though:

* Change the documentation to reflect the fact that the returned metrics are in GiB, not GB.
* Check all currently supported Cinder volume drivers to make sure they all generate capacity metrics in GiB, not GB.

Also relevant is we are trying to fix incorrect reported storage units for metrics in Ceilometer (MB/GB to MiB/GiB) [6], which is what caused us to notice this discrepancy.

[1]: https://docs.openstack.org/api-ref/block-storage/v3/#list-all-back-end-storage-pools
[2]: https://github.com/openstack/cinder/blob/d02171164bdd702b12b59888b744d172f30d712d/cinder/volume/drivers/rsd.py#L370-L373
[3]: https://github.com/openstack/cinder/blob/d02171164bdd702b12b59888b744d172f30d712d/cinder/volume/drivers/solidfire.py#L2174
[4]: https://github.com/openstack/cinder/blob/d02171164bdd702b12b59888b744d172f30d712d/cinder/volume/drivers/pure.py#L1431-L1432
[5]: https://github.com/openstack/cinder/blob/d02171164bdd702b12b59888b744d172f30d712d/cinder/volume/drivers/rbd.py#L752
[6]: https://review.opendev.org/c/openstack/ceilometer/+/962455

description: updated
description: updated
summary: - Volume provider stats reported in GB but actually in GiB
+ Volume provider stats documented as GB but is actually GiB
summary: - Volume provider stats documented as GB but is actually GiB
+ Backend/volume capacity metrics documented as GB but is actually GiB
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.