The swap measurement unit is not specified in the CLI table

Bug #1323541 reported by Yogev Rabl
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Rui Zang
python-novaclient
Fix Released
Undecided
Rui Zang

Bug Description

Description of problem:
The measurement unit of the swap memory in the flavor is MB, unlike all the other disk's units, which are GB.
This might cause a confusion in the CLI when the unit is not specified:
 +--------------------------------------+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+--------------------------------------+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 13eec680-fa84-4c8a-98ed-51ad564bb0c6 | m1.tiny | 512 | 1 | 0 | 512 | 1 | 1.0 | True |
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True |
| 41f44ff1-b09c-4d14-948d-ead7cf2177a9 | m1.small | 2048 | 20 | 40 | | 1 | 1.0 | True |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True |
+--------------------------------------+-----------+-----------+------+-----------+------+-------+-------------+-----------+

Version-Release number of selected component (if applicable):
openstack-nova-compute-2014.1-2.el7ost.noarch
openstack-nova-cert-2014.1-2.el7ost.noarch
openstack-nova-novncproxy-2014.1-2.el7ost.noarch
python-novaclient-2.17.0-1.el7ost.noarch
python-nova-2014.1-2.el7ost.noarch
openstack-nova-api-2014.1-2.el7ost.noarch
openstack-nova-network-2014.1-2.el7ost.noarch
openstack-nova-console-2014.1-2.el7ost.noarch
openstack-nova-scheduler-2014.1-2.el7ost.noarch
openstack-nova-conductor-2014.1-2.el7ost.noarch
openstack-nova-common-2014.1-2.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. add swap to a flavor
2. run the CLI command:
# nova flavor-list

Tags: api
Revision history for this message
Thang Pham (thang-pham) wrote :

I can see the need for swap to be in MB if the instance memory is less than 1G. According to Red Hat (https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/ch-swapspace.html): Swap should equal 2x physical RAM for up to 2 GB of physical RAM, and then an additional 1x physical RAM for any amount above 2 GB, but never less than 32 MB.

I am not sure if this is a bug. Maybe the swap column should be more appropriately labeled, e.g. Swap_MB, to match the size it is showing.

Changed in nova:
importance: Undecided → Low
Tracy Jones (tjones-i)
tags: added: api
Revision history for this message
Rui Zang (rui-zang) wrote :

I agree that appropriately labeling "Swap" by annotating MB is a better idea than changing it to GB.

Changed in nova:
assignee: nobody → Rui Zang (rui-zang)
status: New → In Progress
assignee: Rui Zang (rui-zang) → nobody
assignee: nobody → Rui Zang (rui-zang)
Revision history for this message
Joe Gordon (jogo) wrote :

It sounds like this may be a novaclient issue rather then a nova issue.

Rui Zang (rui-zang)
Changed in python-novaclient:
assignee: nobody → Rui Zang (rui-zang)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/97694
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=1490001c3ee9b2c935c5f81df97d46ae585c4dfc
Submitter: Jenkins
Branch: master

commit 1490001c3ee9b2c935c5f81df97d46ae585c4dfc
Author: Rui Zang <email address hidden>
Date: Wed Jun 4 22:30:33 2014 +0800

    Add swap measurement unit (MB) to CLI output

    The measurement unit of the swap memory in flavor is MB.
    If not clearly labeled, some may confuse it with other disk's
    units which are GB.

    Closes-Bug: #1323541
    Change-Id: I29b4c8e14bcdb3505d5c0bae8bcf653c96b27413

Changed in python-novaclient:
status: In Progress → Fix Committed
Rui Zang (rui-zang)
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-1
status: Fix Committed → Fix Released
Michael Still (mikal)
Changed in python-novaclient:
milestone: none → 2.18.0
Michael Still (mikal)
Changed in python-novaclient:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-1 → 2014.2
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.