rxtx_factor should be validated as a float

Bug #1081287 reported by Dan Prince
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Dan Prince

Bug Description

When creating a flavor rxtx_factor must be an integer:

[root@nova1 ~]# nova flavor-create --ephemeral 0 --swap 0 --rxtx-factor=1.0 foo 99 256 10 1
ERROR: rxtx_factor must be an integer.

In contrast rxtx_factor is stored and displayed as a float within Nova:

[root@nova1 ~]# nova flavor-show 1 | grep rxtx
| rxtx_factor | 1.0 |

----

We should make things consistent when creating and viewing stored flavors....

Dan Prince (dan-prince)
Changed in nova:
assignee: nobody → Dan Prince (dan-prince)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Revision history for this message
Dan Prince (dan-prince) wrote :

Base on feedback in the initial merge prop we are going to update the validations so that rxtx_factor is properly validated as a float instead.

summary: - rxtx_factor should be stored/displayed as an Int
+ rxtx_factor should be validated as a float
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Reviewed: https://review.openstack.org/16977
Committed: http://github.com/openstack/nova/commit/47ddb8ca76fba11a6e77b12e9eeb61b5a9c78c48
Submitter: Jenkins
Branch: master

commit 47ddb8ca76fba11a6e77b12e9eeb61b5a9c78c48
Author: Dan Prince <email address hidden>
Date: Tue Nov 27 10:28:01 2012 -0500

    Validate rxtx_factor as a float.

    Updates the rxtx_factor validations in the instance_types modules so
    that rxtx_factor is validated as a float. Given that rxtx_factor is stored
    as a float in the database this makes sense... and also adheres
    to some of the extension documentation as well (although some of
    the extension docs were incorrect as well).

    Previously rxtx_factor was being cast into an int which caused it to
    be stored and displayed incorrectly via the API.

    This patchset adds a test which fails with the old code.

    Additionally some of the API docs are corrected so that rxtx_factor is
    listed as a float in all examples.

    Fixes LP Bug #1081287.

    Change-Id: Iae98522a1f2ed63cbd2497b0b0af5ac2d9bb935c

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-2 → 2013.1
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.