ComputeFault while creating a snapshot with a really long name (>256 characters)

Bug #1004564 reported by Rohit Karajgi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Unassigned

Bug Description

Our tempest test fails while creating a snapshot of a server. The snapshot name passed is over 256 characters in length.

Expected Error: 400 BadRequest
Actual Error : 500 ComputeFault

Branch: stable/essex

Test:
Return an error if snapshot name over 256 characters is passed ... FAIL

======================================================================
FAIL: Return an error if snapshot name over 256 characters is passed
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/stack/tempest/tempest/tests/test_images.py", line 222, in test_create_image_specify_name_over_256_chars
    self.fail("Should return 400 BadRequest for this operation")
AssertionError: Should return 400 BadRequest for this operation
-------------------- >> begin captured logging << --------------------
tempest.config: INFO: Using tempest config file /opt/stack/tempest/etc/tempest.conf
tempest.common.rest_client: ERROR: Request URL: http://10.2.3.164:8774/v2/e5eb2e14ed8a409d9b36db3fddb5a757/images/9ea13f87-88ff-420c-8822-4d7ee7352d51
tempest.common.rest_client: ERROR: Request Body: None
tempest.common.rest_client: ERROR: Response Headers: {'date': 'Fri, 25 May 2012 15:56:13 GMT', 'status': '404', 'content-length': '62', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-80b9136f-5e1f-437d-933f-fbf8335d4866'}
tempest.common.rest_client: ERROR: Response Body: {"itemNotFound": {"message": "Image not found.", "code": 404}}
tempest.common.rest_client: ERROR: Request URL: http://10.2.3.164:8774/v2/e5eb2e14ed8a409d9b36db3fddb5a757/servers/572153ec-505d-4803-b166-9f494a08360c/action
tempest.common.rest_client: ERROR: Request Body: {"createImage": {"name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa73153641560"}}
tempest.common.rest_client: ERROR: Response Headers: {'date': 'Fri, 25 May 2012 15:56:24 GMT', 'status': '500', 'content-length': '128', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-c6bb53f7-121d-41cc-93b1-5e56ca2d9423'}
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 << ---------------------

----------------------------------------------------------------------
Ran 1 test in 31.747s

FAILED (failures=1)

Tags: ntt tempest
Changed in nova:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :
Download full text (3.7 KiB)

Looks like this is already fixed

REQ: curl -i http://192.168.1.136:8774/v2/e5df6fe673ed4becb58605fdd9e85fc8/servers/65d19429-6ba3-46af-aa3e-e2682f6b7360/action -X POST -H "X-Auth-Project-Id: demo" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 6aea61cfb02e4c019a3d6fab392afc6b" -d '{"createImage": {"name": "65d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b7360", "metadata": {}}}'

send: u'POST /v2/e5df6fe673ed4becb58605fdd9e85fc8/servers/65d19429-6ba3-46af-aa3e-e2682f6b7360/action HTTP/1.1\r\nHost: 192.168.1.136:8774\r\nContent-Length: 369\r\nx-auth-project-id: demo\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nx-auth-token: 6aea61cfb02e4c019a3d6fab392afc6b\r\nuser-agent: python-novaclient\r\ncontent-type: application/json\r\n\r\n{"createImage": {"name": "65d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b7360", "metadata": {}}}'
reply: 'HTTP/1.1 400 Bad Request\r\n'
header: Content-Length: 141
header: Content-Type: application/json; charset=UTF-8
header: X-Compute-Request-Id: req-9f633a87-63f1-4cca-9dce-2f016658f09a
header: Date: Sat, 24 Nov 2012 00:48:12 GMT
RESP:{'date': 'Sat, 24 Nov 2012 00:48:12 GMT', 'status': '400', 'content-length': '141', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-9f633a87-63f1-4cca-9dce-2f016658f09a'} {"badRequest": {"message": "The server could not comply with the request since it is either malformed or otherwise incorrect.", "code": 400}}

DEBUG (shell:543) The server could not comply with the request since it is either malformed or otherwise incorrect. (HTTP 400) (Request-ID: req-9f633a87-63f1-4cca-9dce-2f016658f09a)
Traceback (most recent call last):
  File "/opt/stack/python-novaclient/novaclient/shell.py", line 540, in main
    OpenStackComputeShell().main(sys.argv[1:])
  File "/opt/stack/python-novaclient/novaclient/shell.py", line 476, in main
    args.func(self.cs, args)
  File "/opt/stack/python-novaclient/novaclient/v1_1/shell.py", line 914, in do_image_create
    image_uuid = cs.servers.create_image(server, args.name)
  File "/opt/stack/python-novaclient/novaclient/v1_1/servers.py", line 613, in create_image
    location = self._action('createImage', server, body)[0]['location']
  File "/opt/stack/python-novaclient/novaclient/v1_1/servers.py", line 715, in _action
    return self.api.client.post(url, body=body)
  File "/opt/stack/python-novaclient/novaclient/client.py", line 244, in post
    return self._cs_request(url, 'POST', **kwargs)
  File "/opt/stack/python-novaclient/novaclient/client.py", line 228, in _cs_request
    **kwargs)
  File "/opt/s...

Read more...

Changed in nova:
status: Confirmed → Fix Released
tags: added: tempest
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.