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].
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 backend 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.
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].
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 backend 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 /github. com/openstack/ cinder/ blob/d02171164b dd702b12b59888b 744d172f30d712d /cinder/ volume/ drivers/ rsd.py# L370-L373 /github. com/openstack/ cinder/ blob/d02171164b dd702b12b59888b 744d172f30d712d /cinder/ volume/ drivers/ solidfire. py#L2174 /github. com/openstack/ cinder/ blob/d02171164b dd702b12b59888b 744d172f30d712d /cinder/ volume/ drivers/ pure.py# L1431-L1432 /github. com/openstack/ cinder/ blob/d02171164b dd702b12b59888b 744d172f30d712d /cinder/ volume/ drivers/ rbd.py# L752 /review. opendev. org/c/openstack /ceilometer/ +/962455
[2]: https:/
[3]: https:/
[4]: https:/
[5]: https:/
[6]: https:/