swap is interpreted in GB, not MB

Bug #849154 reported by Scott Moser
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Vish Ishaya

Bug Description

I created a m1.xsmall instance type with:
nova-manage instance_type create --flavor=0 --memory=512 --local_gb=2 --swap=512 --cpu=1 --name "m1.xsmall"

And then launched an instance.
The instance has 512G of swap space.

There isn't really any documentation AFAIK other than at [1], but it seems to me that MB makes more sense for swap space.
I know that the libvirt backend interprets as Gig, but i'm not sure about other back ends.

[1] http://ken.pepple.info/openstack/2011/03/03/Configurable-Instance-Types-For-OpenStack-Nova/

Related branches

Scott Moser (smoser)
Changed in nova:
assignee: nobody → Scott Moser (smoser)
status: New → In Progress
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → 2011.3
Revision history for this message
Eric Dodemont (dodeeric) wrote :

It looks like the nova-manage command has still to be adapted because that command still shows the swap in GB:

E.g.:

root@node1:~# nova-manage flavor list
a1.medium: Memory: 4096MB, VCPUS: 2, Storage: 40GB, FlavorID: 7, Swap: 4GB, RXTX Quota: 0GB, RXTX Cap: 0MB

Flavor: Swap = 4 GB ===> NOK

root@node1:/var/lib/nova/instances/instance-00000018# qemu-img info disk.swap
disk size: 4.0M

Disk: Swap = 4 MB ===> OK

Man page:

nova-manage flavor create <name> <memory> <vCPU> <local_storage> <flavorID> <(optional) swap> <(optional) RXTX Quota> <(optional) RXTX Cap>

                 -· swap space (expressed in megabytes, defaults to zero, optional) ===> OK

Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → In Progress
importance: Undecided → Medium
assignee: Scott Moser (smoser) → Vish Ishaya (vishvananda)
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → In Progress
Thierry Carrez (ttx)
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
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.