bin/stack: urllib2.HTTPError when issuing reflection request

Bug #704447 reported by Jay Pipes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Jay Pipes

Bug Description

After fixing both bug #704422 and bug #704424, and simply calling bin/stack in order to get the help output, I get the following fairly unhelpful 500 server error returned from nova-direct-api, and unfortunately, no output at all on the screen I have nova-direct-api running:

(.nova-venv)jpipes@serialcoder:~/repos/nova/trunk$ ./bin/stack
Traceback (most recent call last):
  File "./bin/stack", line 118, in <module>
    print help_all()
  File "./bin/stack", line 72, in help_all
    rv = do_request('reflect', 'get_controllers')
  File "./bin/stack", line 109, in do_request
    resp = urllib2.urlopen(req)
  File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.6/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/usr/lib/python2.6/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.6/urllib2.py", line 435, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.6/urllib2.py", line 518, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 500: Internal Server Error

Tags: direct-api

Related branches

Revision history for this message
Jay Pipes (jaypipes) wrote :
Download full text (4.0 KiB)

After adding a try/except block around the call to urllib2.urlopen() and printing out the error being returned like so:

    try:
        resp = urllib2.urlopen(req)
    except urllib2.HTTPError, e:
        print e.read()
        sys.exit(1)

I got this:

Traceback (most recent call last):
  File "/home/jpipes/repos/nova/trunk/.nova-venv/lib/python2.6/site-packages/eventlet/wsgi.py", line 336, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/home/jpipes/repos/nova/trunk/.nova-venv/lib/python2.6/site-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/home/jpipes/repos/nova/trunk/.nova-venv/lib/python2.6/site-packages/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/home/jpipes/repos/nova/trunk/nova/wsgi.py", line 207, in __call__
    response = req.get_response(self.application)
  File "/home/jpipes/repos/nova/trunk/.nova-venv/lib/python2.6/site-packages/webob/request.py", line 919, in get_response
    application, catch_exc_info=False)
  File "/home/jpipes/repos/nova/trunk/.nova-venv/lib/python2.6/site-packages/webob/request.py", line 887, in call_application
    app_iter = application(self.environ, start_response)
  File "/home/jpipes/repos/nova/trunk/.nova-venv/lib/python2.6/site-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/home/jpipes/repos/nova/trunk/.nova-venv/lib/python2.6/site-packages/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/home/jpipes/repos/nova/trunk/nova/wsgi.py", line 207, in __call__
    response = req.get_response(self.application)
  File "/home/jpipes/repos/nova/trunk/.nova-venv/lib/python2.6/site-packages/webob/request.py", line 919, in get_response
    application, catch_exc_info=False)
  File "/home/jpipes/repos/nova/trunk/.nova-venv/lib/python2.6/site-packages/webob/request.py", line 887, in call_application
    app_iter = application(self.environ, start_response)
  File "/home/jpipes/repos/nova/trunk/.nova-venv/lib/python2.6/site-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/home/jpipes/repos/nova/trunk/.nova-venv/lib/python2.6/site-packages/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/home/jpipes/repos/nova/trunk/nova/wsgi.py", line 207, in __call__
    response = req.get_response(self.application)
  File "/home/jpipes/repos/nova/trunk/.nova-venv/lib/python2.6/site-packages/webob/request.py", line 919, in get_response
    application, catch_exc_info=False)
  File "/home/jpipes/repos/nova/trunk/.nova-venv/lib/python2.6/site-packages/webob/request.py", line 887, in call_application
    app_iter = application(self.environ, start_response)
  File "/home/jpipes/repos/nova/trunk/.nova-venv/lib/python2.6/site-packages/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/home/jpipes/repos/nova/trunk/.nova-venv/lib/python2.6/site-packages/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/hom...

Read more...

Changed in nova:
status: Confirmed → In Progress
assignee: nobody → Jay Pipes (jaypipes)
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → 2011.1
status: Fix Committed → Fix Released
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.