Server error when querying /

Bug #1700144 reported by Kristi Nikolla
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mix and Match (mixmatch)
Fix Released
Medium
Leo Tomatsu

Bug Description

When querying the root of the API, Server Error 500 is returned. This is because the path is analyzed for the presence of "volume" or "image", "v1" or "v2".

2017-06-23 18:01:13.436 23689 ERROR root [-] ['']
[2017-06-23 18:01:13,437] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./mixmatch/proxy.py", line 331, in proxy
    k2k_request = RequestHandler(request.method, path, request.headers)
  File "./mixmatch/proxy.py", line 95, in __init__
    self.details = get_details(method, path.split('/'), headers)
  File "./mixmatch/proxy.py", line 61, in get_details
    'service': get_service(path),
  File "./mixmatch/proxy.py", line 50, in get_service
    raise ValueError
ValueError

Changed in mixmatch:
assignee: nobody → Leo Tomatsu (leo.tomatsu)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mixmatch (master)

Reviewed: https://review.openstack.org/479368
Committed: https://git.openstack.org/cgit/openstack/mixmatch/commit/?id=199dbbaea896811ebb2f93567539ab4a7cc41aa4
Submitter: Jenkins
Branch: master

commit 199dbbaea896811ebb2f93567539ab4a7cc41aa4
Author: ltomatsu <email address hidden>
Date: Fri Jun 30 16:29:45 2017 +0000

    Return 404 rather than ValueError

    The get_service function returns ValueError
    when the service response is neither cinder
    nor glance. Switch this over to abort 404.

    Closes-Bug: #1700144
    Change-Id: If2cf585dd555eab4771a27fe6f272842a3d498fe

Changed in mixmatch:
status: In Progress → 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.