'limit param must be an integer' when listing images via OSAPI

Bug #803055 reported by Dan Prince
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Critical
Brian Waldon
Diablo
Fix Released
Critical
Brian Waldon

Bug Description

I'm getting the following stack trace in glance-api.log with Glance trunk (revision 146):

2011-06-28 16:24:41 DEBUG [routes.middleware] Match dict: {'action': u'detail', 'controller': <glance.common.wsgi.Resource object at 0x27b1150>}
2011-06-28 16:24:41 DEBUG [eventlet.wsgi.server] Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/eventlet/wsgi.py", line 336, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/pymodules/python2.6/glance/common/wsgi.py", line 113, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/pymodules/python2.6/webob/request.py", line 1053, in get_response
    application, catch_exc_info=False)
  File "/usr/lib/pymodules/python2.6/webob/request.py", line 1022, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/pymodules/python2.6/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/pymodules/python2.6/glance/common/wsgi.py", line 311, in __call__
    request, **action_args)
  File "/usr/lib/pymodules/python2.6/glance/common/wsgi.py", line 328, in dispatch
    return method(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/glance/api/v1/images.py", line 124, in detail
    images = registry.get_images_detail(self.options, **params)
  File "/usr/lib/pymodules/python2.6/glance/registry/__init__.py", line 42, in get_images_detail
    return c.get_images_detailed(**kwargs)
  File "/usr/lib/pymodules/python2.6/glance/registry/client.py", line 74, in get_images_detailed
    res = self.do_request("GET", "/images/detail", params=params)
  File "/usr/lib/pymodules/python2.6/glance/common/client.py", line 134, in do_request
    raise exception.Invalid(res.read())
Invalid: 400 Bad Request

The server could not comply with the request since it is either malformed or otherwise incorrect.

 limit param must be an integer
2011-06-28 16:24:41 DEBUG [eventlet.wsgi.server] 172.19.0.3 - - [28/Jun/2011 16:24:41] "GET /v1/images/detail?marker=None&limit=None HTTP/1.1" 500 2545 0.007550

Related branches

Revision history for this message
Dan Prince (dan-prince) wrote :

This causes server creation to fail when using Glance w/ Nova.

Changed in glance:
importance: Undecided → Critical
Revision history for this message
Brian Waldon (bcwaldon) wrote :

The 400 is expected due to the 'None' in the query params. This looks like either V1Client or registry.Client are passing None when they shouldn't be providing a limit/marker at all.

Changed in glance:
assignee: nobody → Brian Waldon (bcwaldon)
Brian Waldon (bcwaldon)
Changed in glance:
status: New → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: diablo-2 → 2011.3
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.