Throwing 500 error when empty or invalid size parameter is sent in request to create volume

Bug #1006857 reported by Rajalakshmi Ganesan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Invalid
Undecided
Mike Perez
OpenStack Compute (nova)
In Progress
Low
Mike Perez

Bug Description

Throwing 500 error when empty or invalid size parameter is sent in request to create volume.

Expected Result:

Error message shpuld state that size parameter should be a valid integer and error code returned should be 400 i.e indicating BadRequest.

Actual Result:
Error code 500 is returned, indicating Compute Fault.

LOG:
----------
======================================================================
ERROR: Negative: Should not be able to create volume with invalid size in request
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/nose/tools.py", line 80, in newfunc
    func(*arg, **kw)
  File "/home/muralik/tempest_raj/tempest_31may2/tempest/tempest/tests/test_volumes_negative.py", line 68, in test_create_volume_with_invalid_size
    metadata=metadata)
  File "/home/muralik/tempest_raj/tempest_31may2/tempest/tempest/services/nova/json/volumes_client.py", line 66, in create_volume
    resp, body = self.post('os-volumes', post_body, self.headers)
  File "/home/muralik/tempest_raj/tempest_31may2/tempest/tempest/common/rest_client.py", line 152, in post
    return self.request('POST', url, headers, body)
  File "/home/muralik/tempest_raj/tempest_31may2/tempest/tempest/common/rest_client.py", line 225, in request
    raise exceptions.ComputeFault(message)
ComputeFault: Got compute fault
Details: Got compute fault
Details: The server has either erred or is incapable of performing the requested operation.
-------------------- >> begin captured logging << --------------------
tempest.config: INFO: Using tempest config file /home/muralik/tempest_raj/tempest_31may2/tempest/etc/tempest.conf
tempest.common.rest_client: ERROR: Request URL: http://10.233.52.27:8774/v2/72bf0c9efd60493a9aacfc1ab13f4fad/os-volumes
tempest.common.rest_client: ERROR: Request Body: {"volume": {"metadata": {"Type": "work"}, "display_name": "Volume-42295694373", "size": "#$%"}}
tempest.common.rest_client: ERROR: Response Headers: {'date': 'Thu, 31 May 2012 17:38:39 GMT', 'status': '500', 'content-length': '128', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-7e9e1bca-2a3f-4dc3-8c63-8e20150f6b8d'}
tempest.common.rest_client: ERROR: Response Body: {u'computeFault': {u'message': u'The server has either erred or is incapable of performing the requested operation.', u'code': 500}}
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Negative: Should not be able to create volume without passing size in request
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/nose/tools.py", line 80, in newfunc
    func(*arg, **kw)
  File "/home/muralik/tempest_raj/tempest_31may2/tempest/tempest/tests/test_volumes_negative.py", line 80, in test_create_volume_with_out_passing_size
    metadata=metadata)
  File "/home/muralik/tempest_raj/tempest_31may2/tempest/tempest/services/nova/json/volumes_client.py", line 66, in create_volume
    resp, body = self.post('os-volumes', post_body, self.headers)
  File "/home/muralik/tempest_raj/tempest_31may2/tempest/tempest/common/rest_client.py", line 152, in post
    return self.request('POST', url, headers, body)
  File "/home/muralik/tempest_raj/tempest_31may2/tempest/tempest/common/rest_client.py", line 225, in request
    raise exceptions.ComputeFault(message)
ComputeFault: Got compute fault
Details: Got compute fault
Details: The server has either erred or is incapable of performing the requested operation.
-------------------- >> begin captured logging << --------------------
tempest.common.rest_client: ERROR: Request URL: http://10.233.52.27:8774/v2/72bf0c9efd60493a9aacfc1ab13f4fad/os-volumes
tempest.common.rest_client: ERROR: Request Body: {"volume": {"metadata": {"Type": "work"}, "display_name": "Volume-73480276856", "size": ""}}
tempest.common.rest_client: ERROR: Response Headers: {'date': 'Thu, 31 May 2012 17:38:39 GMT', 'status': '500', 'content-length': '128', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-ac461ade-1e84-401f-84ac-aa8035b8dea8'}
tempest.common.rest_client: ERROR: Response Body: {u'computeFault': {u'message': u'The server has either erred or is incapable of performing the requested operation.', u'code': 500}}
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------

Tags: bot-comment
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1006857/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → nova
Changed in nova:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Mike Perez (thingee) wrote :
Changed in cinder:
status: New → Confirmed
assignee: nobody → Mike Perez (thingee)
Mike Perez (thingee)
Changed in nova:
assignee: nobody → Mike Perez (thingee)
Changed in cinder:
status: Confirmed → Invalid
Changed in nova:
status: Confirmed → In Progress
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.