out of range flavor parameter should return error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Edward Hope-Morley |
Bug Description
Currently if user provides a parameter value to nova flavor-create that is out of range e.g.
nova flavor-create --rxtx-factor 340282300000000
we get a warning in the logs:
/usr/local/
and nova cli returns 200 and a message as follows:
+-----+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+-----+
| 100 | foo | 1 | 1 | 0 | | 1 | 3.402823e+48 | True |
+-----+
i.e. indicating that the full value has been written successfully. If you then do a nova flavour-list and look at the rxtx_factor:
+-----+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+-----+
| 100 | foo | 1 | 1 | 0 | | 1 | 3.40282e+38 | True |
we see that the value was actually truncated to fit the max value for Float. While it is not likely that such large values would be used, it would be better if the call failed (400) and only succeeded if valid values were supplied.
Changed in nova: | |
status: | New → In Progress |
assignee: | nobody → Edward Hope-Morley (hopem) |
Changed in nova: | |
importance: | Undecided → Low |
Changed in nova: | |
milestone: | none → icehouse-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | icehouse-3 → 2014.1 |
Fix proposed to branch: master /review. openstack. org/60887
Review: https:/