Activity log for bug #1577727

Date Who What changed Old value New value Message
2016-05-03 11:04:06 Dinesh Bhor bug added bug
2016-05-03 11:04:45 Dinesh Bhor nova: assignee Dinesh Bhor (dinesh-bhor)
2016-05-03 16:20:47 Pushkar Umaranikar nova: status New Invalid
2016-05-03 16:25:29 Pushkar Umaranikar tags api
2016-05-04 04:21:48 Dinesh Bhor summary nova flavor-create raises 500 error if long value passed to flavor properties nova flavor-create raises 500 error if large value passed to flavor properties
2016-05-04 07:03:53 Dinesh Bhor description If long value is provided for properties other than name and ID then 500 error is raised. Command: nova flavor-create new_flavor 35 234276234512334234 200 2 n-api LOG: 2016-05-03 10:44:46.744 ERROR nova.api.openstack.extensions [req-cadc48da-abb0-4dfb-abb8-c18855e45d30 admin admin] Unexpected exception in API method 2016-05-03 10:44:46.744 TRACE nova.api.openstack.extensions Traceback (most recent call last): 2016-05-03 10:44:46.744 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/extensions.py", line 478, in wrapped 2016-05-03 10:44:46.744 TRACE nova.api.openstack.extensions return f(*args, **kwargs) 2016-05-03 10:44:46.744 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/validation/__init__.py", line 73, in wrapper 2016-05-03 10:44:46.744 TRACE nova.api.openstack.extensions return func(*args, **kwargs) 2016-05-03 10:44:46.744 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/validation/__init__.py", line 73, in wrapper 2016-05-03 10:44:46.744 TRACE nova.api.openstack.extensions return func(*args, **kwargs) 2016-05-03 10:44:46.744 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/compute/flavor_manage.py", line 81, in _create 2016-05-03 10:44:46.744 TRACE nova.api.openstack.extensions is_public=is_public) 2016-05-03 10:44:46.744 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/compute/flavors.py", line 152, in create 2016-05-03 10:44:46.744 TRACE nova.api.openstack.extensions db.MAX_INT) 2016-05-03 10:44:46.744 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/utils.py", line 1030, in validate_integer 2016-05-03 10:44:46.744 TRACE nova.api.openstack.extensions 'max_value': max_value}) 2016-05-03 10:44:46.744 TRACE nova.api.openstack.extensions InvalidInput: Invalid input received: ram must be <= 2147483647 2016-05-03 10:44:46.744 TRACE nova.api.openstack.extensions 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
2016-05-04 07:23:42 Dinesh Bhor nova: status Invalid New
2016-05-04 21:48:34 Pushkar Umaranikar nova: status New Confirmed
2016-05-06 06:01:53 OpenStack Infra nova: status Confirmed In Progress
2016-05-29 22:38:23 OpenStack Infra nova: status In Progress Fix Released