KeyError masks real errors in server tests

Bug #899396 reported by Jay Pipes
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Jay Pipes

Bug Description

Getting a ton of these when running nosetests storm:

ERROR: test suite for <class 'storm.tests.test_image_metadata.ImagesMetadataTest'>
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/nose/", line 208, in run
  File "/usr/lib/pymodules/python2.7/nose/", line 291, in setUp
  File "/usr/lib/pymodules/python2.7/nose/", line 314, in setupContext
    try_run(context, names)
  File "/usr/lib/pymodules/python2.7/nose/", line 478, in try_run
    return func()
  File "/home/stack/tempest/storm/tests/", line 23, in setUpClass
  File "/home/stack/tempest/storm/services/nova/json/", line 59, in create_server
    return resp, body['server']
KeyError: 'server'

The KeyError is masking an underlying issue and the servers_client class should trap non 200 OK returns on the API calls to give the user some better information about what's really going on

Tags: glance
Revision history for this message
Jay Pipes (jaypipes) wrote :

Note that in my case, the following was what was *really* being returned when trying to create a server (and this was being masked by the code):

{"overLimitFault": {"message": "This request was rate-limited.", "code": 413, "details": "Only 10 POST request(s) can be made to * every minute."}

tags: added: testcase
tags: added: glance
tags: removed: testcase
Revision history for this message
Jay Pipes (jaypipes) wrote :

This has now been addressed in the base rest_client, which now traps for 413 overLimits, 404 Not Found, and 400 Bad Request.

Changed in tempest:
milestone: none → essex-3
status: In Progress → Fix Committed
Jay Pipes (jaypipes)
Changed in tempest:
status: Fix Committed → Fix Released
Sean Dague (sdague)
Changed in tempest:
milestone: none → havana-3
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.