Hi Pushkar,

Thank you for your comment. I have updated the bug description for better 
understanding.
Please let me know if you have any questions.

** Changed in: nova
       Status: Invalid => New

-- 
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/1577727

Title:
  nova flavor-create raises 500 error if large value passed to flavor
  properties

Status in OpenStack Compute (nova):
  New

Bug description:
  If large value is provided for properties other than name and ID then
  500 error is raised.

  All integral flavor properties are validated against db.MAX_INT(2147483647) 
for maximum limit and raised exception.InvalidInput for invalid input.
  As exception.InvalidInput is not caught, it is returning 500 
InternalServerError.

  Expected result:
  Instead of 500 InternalServerError it should return 400 HTTPBadRequest with 
message 'Invalid input received: ram must be <= 2147483647'.

  Command:
  nova flavor-create new_flavor 35 23478279183291369182 200 2

  Output:
  ERROR (ClientException): Unexpected API Error. Please report this at 
http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
  <class 'nova.exception.InvalidInput'> (HTTP 500) (Request-ID: 
req-35f422d1-7232-4dfa-ab8e-7de36d11dcaf)

  n-api LOG:

  2016-05-04 06:15:20.072 ERROR nova.api.openstack.extensions 
[req-35f422d1-7232-4dfa-ab8e-7de36d11dcaf admin admin] Unexpected exception in 
API method
  2016-05-04 06:15:20.072 TRACE nova.api.openstack.extensions Traceback (most 
recent call last):
  2016-05-04 06:15:20.072 TRACE nova.api.openstack.extensions   File 
"/opt/stack/nova/nova/api/openstack/extensions.py", line 478, in wrapped
  2016-05-04 06:15:20.072 TRACE nova.api.openstack.extensions     return 
f(*args, **kwargs)
  2016-05-04 06:15:20.072 TRACE nova.api.openstack.extensions   File 
"/opt/stack/nova/nova/api/validation/__init__.py", line 73, in wrapper
  2016-05-04 06:15:20.072 TRACE nova.api.openstack.extensions     return 
func(*args, **kwargs)
  2016-05-04 06:15:20.072 TRACE nova.api.openstack.extensions   File 
"/opt/stack/nova/nova/api/validation/__init__.py", line 73, in wrapper
  2016-05-04 06:15:20.072 TRACE nova.api.openstack.extensions     return 
func(*args, **kwargs)
  2016-05-04 06:15:20.072 TRACE nova.api.openstack.extensions   File 
"/opt/stack/nova/nova/api/openstack/compute/flavor_manage.py", line 81, in 
_create
  2016-05-04 06:15:20.072 TRACE nova.api.openstack.extensions     
is_public=is_public)
  2016-05-04 06:15:20.072 TRACE nova.api.openstack.extensions   File 
"/opt/stack/nova/nova/compute/flavors.py", line 152, in create
  2016-05-04 06:15:20.072 TRACE nova.api.openstack.extensions     db.MAX_INT)
  2016-05-04 06:15:20.072 TRACE nova.api.openstack.extensions   File 
"/opt/stack/nova/nova/utils.py", line 1030, in validate_integer
  2016-05-04 06:15:20.072 TRACE nova.api.openstack.extensions     'max_value': 
max_value})
  2016-05-04 06:15:20.072 TRACE nova.api.openstack.extensions InvalidInput: 
Invalid input received: ram must be <= 2147483647
  2016-05-04 06:15:20.072 TRACE nova.api.openstack.extensions

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to