Cinder client incorrectly list the volume size units in GB, the API is actually in GiB

Bug #1511167 reported by Kurt Martin
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Richard Hagarty
python-cinderclient
Fix Released
Undecided
Kurt Martin
python-manilaclient
Fix Released
Undecided
NidhiMittalHada

Bug Description

Both Horizon and the cinder client documents the size paramater in gigabyes(GB) but the API docs(both v1 and v2) list the size units as gibibytes(GiBs). The correct unit should be gibibytes(GiBs)

Mike Perez (thingee)
no longer affects: cinder
Changed in openstack-api-site:
status: New → In Progress
assignee: nobody → Mike Perez (thingee)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to api-site (master)

Fix proposed to branch: master
Review: https://review.openstack.org/240091

Revision history for this message
Kurt Martin (kurt-f-martin) wrote :

The LVM driver is in fact creating volumes in gibibytes (GiB), lvdisplay is showing the volume in GiBs... see http://paste.openstack.org/show/477912/ for details. This means that the API is documented correctly. The cinder client (http://paste.openstack.org/show/477913/) and Horizon should actually have the units corrected from GB to GiB. I would like to post patches to both the cinder client and horizon to remove any confusion on the units that Cinder is using.

summary: - Cinder API docs incorrectly list the volume size units
+ Cinder client incorrectly list the volume size units in GB, the API is
+ actually in GiB
affects: openstack-api-site → python-cinderclient
Revision history for this message
Kurt Martin (kurt-f-martin) wrote :

Review for the python-cinderclient: https://review.openstack.org/#/c/241405/

Changed in python-cinderclient:
assignee: Mike Perez (thingee) → Kurt Martin (kurt-f-martin)
description: updated
Changed in horizon:
assignee: nobody → Richard Hagarty (richard-hagarty)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-cinderclient (master)

Reviewed: https://review.openstack.org/241405
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=cb08ce33eb74cb95702081846280a194823d86ae
Submitter: Jenkins
Branch: master

commit cb08ce33eb74cb95702081846280a194823d86ae
Author: Kurt Martin <email address hidden>
Date: Tue Nov 3 15:13:20 2015 -0800

    Fix volume size units to match the API

    Both Horizon and the cinder client documents the size paramater in
    gigabyes(GBs) but the API docs(both v1 and v2) list the size units as
    gibibytes(GiBs). The correct unit should be gibibytes(GiBs). This
    should help in clearing up any confusion on what units are used in
    Cinder.

    Closes-bug: 1511167
    Change-Id: I42e15c18d1f084d435a2be9b343fb2f6c3cf377f

Changed in python-cinderclient:
status: In Progress → Fix Committed
Revision history for this message
Doug Fish (drfish) wrote :

Has anyone investigated how nova, glance, ceilometer report data? I'd guess they report data in binary units, which we've labelled as traditional/decimal in Horizon.

I'd think if we do this, we'd need to update all of Horizon, not just the cinder/volume parts.

Revision history for this message
Kurt Martin (kurt-f-martin) wrote :

Hi Doug...I've only done the investigation in the cinder client and the cinder create/extend volume API. At least now the cinder client create call matches the cinder API. The majority of storage vendors deal in gibibytes including the LVM reference driver, however, everything else is in gigabytes. If you talk to some people they say GB = GiB, but that is not the case when you get down to the fine details.

Revision history for this message
Richard Hagarty (richard-hagarty) wrote :

Storage admins know the difference between GBs and GiBs, and make assumptions based on how the value is tagged/labeled. Since we have real customers who have complained about how we represent size in Horizon, I think we should focus on the cinder pieces first.

I propose that we just modify the labels in the following panels to read "GiB" instead of "GB", and "gibibytes" instead of "gigibytes":

- project -> create volume
- project -> create snapshot
- project -> extend volume
- project -> volume details
- project -> snapshot details
- admin -> volume details
- admin -> snapshot details
- identity:projects -> modify quotas

We know these are "wrong" as the cinder API assumes "GiB".

I realize there are inconsistencies in other services, and even in within Cinder itself (the CLI for quotas uses the term "gigabytes", when it should be "gibibytes"), but the distinction is probably not as important.

We can open additional defects to handle other inconsistencies if they present any "real" confusion to the customer.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/243880

Changed in horizon:
status: New → In Progress
Changed in horizon:
importance: Undecided → Low
Changed in python-cinderclient:
milestone: none → 1.5.0
Changed in horizon:
assignee: Richard Hagarty (richard-hagarty) → Travis Tripp (travis-tripp)
Changed in horizon:
assignee: Travis Tripp (travis-tripp) → Richard Hagarty (richard-hagarty)
Changed in python-cinderclient:
status: Fix Committed → Fix Released
Changed in python-manilaclient:
assignee: nobody → NidhiMittalHada (nidhimittal19)
Changed in python-manilaclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/243880
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=70ade476b8001ed63cbb371620a035fe1ca7a44a
Submitter: Jenkins
Branch: master

commit 70ade476b8001ed63cbb371620a035fe1ca7a44a
Author: Rich Hagarty <email address hidden>
Date: Tue Nov 10 16:15:53 2015 -0800

    Use "GiB" and "gibibyte" labels in volume panels

    Cinder APIs require size values to be in gibibytes (GiB).
    Horizon panels show these values in gigabytes (GB), which
    confuses storage admins.

    Change-Id: I62ab332d3415f35ead237dd1af5f6a11eb193654
    Partially-Implements: blueprint gb-to-gib-conversion
    Closes-bug: #1511167

Changed in horizon:
status: In Progress → Fix Released
Changed in python-manilaclient:
status: In Progress → Fix Committed
status: Fix Committed → Fix Released
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.