← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1259213] [NEW] out of range flavor parameter should return error

 

Public bug reported:

Currently if user provides a parameter value to nova flavor-create that
is out of range e.g.

nova flavor-create --rxtx-factor
3402823000000000000000000000000000000000000000000 foo 100 1 1 1

we get a warning in the logs:

/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py:331:
Warning: Out of range value for column 'rxtx_factor' at row 1

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.

** Affects: nova
     Importance: Undecided
     Assignee: Edward Hope-Morley (hopem)
         Status: In Progress

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1259213

Title:
  out of range flavor parameter should return error

Status in OpenStack Compute (Nova):
  In Progress

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
  3402823000000000000000000000000000000000000000000 foo 100 1 1 1

  we get a warning in the logs:

  /usr/local/lib/python2.7/dist-
  packages/sqlalchemy/engine/default.py:331: Warning: Out of range value
  for column 'rxtx_factor' at row 1

  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1259213/+subscriptions


Follow ups

References