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)
Looks like this is already fixed
REQ: curl -i http:// 192.168. 1.136:8774/ v2/e5df6fe673ed 4becb58605fdd9e 85fc8/servers/ 65d19429- 6ba3-46af- aa3e-e2682f6b73 60/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: 6aea61cfb02e4c0 19a3d6fab392afc 6b" -d '{"createImage": {"name": "65d19429- 6ba3-46af- aa3e-e2682f6b73 6065d19429- 6ba3-46af- aa3e-e2682f6b73 6065d19429- 6ba3-46af- aa3e-e2682f6b73 6065d19429- 6ba3-46af- aa3e-e2682f6b73 6065d19429- 6ba3-46af- aa3e-e2682f6b73 6065d19429- 6ba3-46af- aa3e-e2682f6b73 6065d19429- 6ba3-46af- aa3e-e2682f6b73 6065d19429- 6ba3-46af- aa3e-e2682f6b73 6065d19429- 6ba3-46af- aa3e-e2682f6b73 60", "metadata": {}}}'
send: u'POST /v2/e5df6fe673e d4becb58605fdd9 e85fc8/ servers/ 65d19429- 6ba3-46af- aa3e-e2682f6b73 60/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: 6aea61cfb02e4c0 19a3d6fab392afc 6b\r\nuser- agent: python- novaclient\ r\ncontent- type: application/ json\r\ n\r\n{" createImage" : {"name": "65d19429- 6ba3-46af- aa3e-e2682f6b73 6065d19429- 6ba3-46af- aa3e-e2682f6b73 6065d19429- 6ba3-46af- aa3e-e2682f6b73 6065d19429- 6ba3-46af- aa3e-e2682f6b73 6065d19429- 6ba3-46af- aa3e-e2682f6b73 6065d19429- 6ba3-46af- aa3e-e2682f6b73 6065d19429- 6ba3-46af- aa3e-e2682f6b73 6065d19429- 6ba3-46af- aa3e-e2682f6b73 6065d19429- 6ba3-46af- aa3e-e2682f6b73 60", "metadata": {}}}' Request- Id: req-9f633a87- 63f1-4cca- 9dce-2f016658f0 9a request- id': 'req-9f633a87- 63f1-4cca- 9dce-2f016658f0 9a'} {"badRequest": {"message": "The server could not comply with the request since it is either malformed or otherwise incorrect.", "code": 400}}
reply: 'HTTP/1.1 400 Bad Request\r\n'
header: Content-Length: 141
header: Content-Type: application/json; charset=UTF-8
header: X-Compute-
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-
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-2f016658f0 9a) python- novaclient/ novaclient/ shell.py" , line 540, in main mputeShell( ).main( sys.argv[ 1:]) python- novaclient/ novaclient/ shell.py" , line 476, in main func(self. cs, args) python- novaclient/ novaclient/ v1_1/shell. py", line 914, in do_image_create create_ image(server, args.name) python- novaclient/ novaclient/ v1_1/servers. py", line 613, in create_image 'createImage' , server, body)[0] ['location' ] python- novaclient/ novaclient/ v1_1/servers. py", line 715, in _action client. post(url, body=body) python- novaclient/ novaclient/ client. py", line 244, in post request( url, 'POST', **kwargs) python- novaclient/ novaclient/ client. py", line 228, in _cs_request
Traceback (most recent call last):
File "/opt/stack/
OpenStackCo
File "/opt/stack/
args.
File "/opt/stack/
image_uuid = cs.servers.
File "/opt/stack/
location = self._action(
File "/opt/stack/
return self.api.
File "/opt/stack/
return self._cs_
File "/opt/stack/
**kwargs)
File "/opt/s...