500 error during queues list when pool enabled and no queue

Bug #1412608 reported by Feilong Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zaqar
Fix Released
Low
Feilong Wang

Bug Description

User will run into a 500 error when there is no queue under the tenant and pool enabled, see below error:

Traceback (most recent call last):
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token.py", line 748, in __call__
    return self._call_app(env, start_response)
  File "/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token.py", line 684, in _call_app
    return self._app(env, _fake_start_response)
  File "/usr/local/lib/python2.7/dist-packages/falcon/api.py", line 96, in __call__
    responder(req, resp, **params) # pragma: no cover
  File "/usr/local/lib/python2.7/dist-packages/falcon/api_helpers.py", line 262, in do_before
    responder(req, resp, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/falcon/api_helpers.py", line 262, in do_before
    responder(req, resp, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/falcon/api_helpers.py", line 262, in do_before
    responder(req, resp, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/falcon/api_helpers.py", line 262, in do_before
    responder(req, resp, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/falcon/api_helpers.py", line 262, in do_before
    responder(req, resp, **kwargs)
  File "/home/feilong/MyWorkspace/workspace_community/zaqar/zaqar/transport/wsgi/v2_0/queues.py", line 148, in on_get
    kwargs['marker'] = next(results) or kwargs.get('marker', '')
  File "/home/feilong/MyWorkspace/workspace_community/zaqar/zaqar/storage/pooling.py", line 169, in _list
    yield marker_name['next']
KeyError: 'next'
127.0.0.1 - - [20/Jan/2015 13:57:30] "GET /v2/queues/ HTTP/1.1" 500 59

Feilong Wang (flwang)
Changed in zaqar:
importance: Undecided → Low
assignee: nobody → Fei Long Wang (flwang)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zaqar (master)

Fix proposed to branch: master
Review: https://review.openstack.org/148396

Changed in zaqar:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to zaqar (master)

Reviewed: https://review.openstack.org/148396
Committed: https://git.openstack.org/cgit/openstack/zaqar/commit/?id=2649062d80bb9b996ba82791d69a54497f5b9e81
Submitter: Jenkins
Branch: master

commit 2649062d80bb9b996ba82791d69a54497f5b9e81
Author: Fei Long Wang <email address hidden>
Date: Tue Jan 20 13:58:28 2015 +1300

    Check marker before accessing it

    When pool is enabled, current code will return marker_name['next']
    no matter if there is the key 'next' in it. Then user will run
    into a KeyError issue. This fix will change it and keep it
    consistent with the behaviour of no pool.

    Closes-Bug: #1412608

    Change-Id: Iea66f99482146c38615fccc3060ab56f7ff98d9e

Changed in zaqar:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in zaqar:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in zaqar:
milestone: kilo-2 → 2015.1.0
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.