Bug 808276 - python-routes causes issues with the nova openstack REST API
python-routes causes issues with the nova openstack REST API
Status: CLOSED CANTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-routes (Show other bugs)
6.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Pádraig Brady
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-29 22:41 EDT by Pádraig Brady
Modified: 2016-01-04 09:46 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-28 11:59:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Pádraig Brady 2012-03-29 22:41:39 EDT
Description of problem:
`nova flavor-list` returns 404.

Enabling debugging shows that the requested flavor URL is being routed incorrectly.

2012-03-30 03:00:36,624 DEBUG routes.middleware [1d8a7ffa-fb80-492b-8fe3-f147b532d81c admin admin] Matched GET /admin/flavors/detail from (pid=4177) __call__ /usr/lib/python2.6/site-packages/routes/middleware.py:97
2012-03-30 03:00:36,625 DEBUG routes.middleware [1d8a7ffa-fb80-492b-8fe3-f147b532d81c admin admin] Route path: '/{project_id}/flavors/:flavor_id/os-extra_specs/:(id)', defaults: {'action': u'show', 'controller': <nova.api.openstack.wsgi.Resource object at 0x2527290>, 'id': 
None} from (pid=4177) __call__ /usr/lib/python2.6/site-packages/routes/middleware.py:99
2012-03-30 03:00:36,625 DEBUG routes.middleware [1d8a7ffa-fb80-492b-8fe3-f147b532d81c admin admin] Match dict: {'action': u'show', 'controller': <nova.api.openstack.wsgi.Resource object at 0x2527290>, 'project_id': u'admin', 'flavor_id': u'detail', 'id': None} from (pid=417
7) __call__ /usr/lib/python2.6/site-packages/routes/middleware.py:100


I rebuilt python-routes-1.12.3 for RHEL 6.2 and it worked fine.


2012-03-30 03:32:48,069 DEBUG routes.middleware [c77cb299-02b3-4110-9099-50bff5f6ddd0 admin admin] No route matched for GET /admin/flavors/detail from (pid=5902) __call__ /usr/lib/python2.6/site-packages/routes/middleware.py:97
2012-03-30 03:32:48,118 DEBUG routes.middleware [c77cb299-02b3-4110-9099-50bff5f6ddd0 admin admin] Matched GET /admin/flavors/detail from (pid=5902) __call__ /usr/lib/python2.6/site-packages/routes/middleware.py:100
2012-03-30 03:32:48,119 DEBUG routes.middleware [c77cb299-02b3-4110-9099-50bff5f6ddd0 admin admin] Route path: '/{project_id}/flavors/detail', defaults: {'action': u'detail', 'controller': <nova.api.openstack.wsgi.Resource object at 0x2ae2d50>} from (pid=5902) __call__ /usr/lib/python2.6/site-packages/routes/middleware.py:102
2012-03-30 03:32:48,119 DEBUG routes.middleware [c77cb299-02b3-4110-9099-50bff5f6ddd0 admin admin] Match dict: {'action': u'detail', 'controller': <nova.api.openstack.wsgi.Resource object at 0x2ae2d50>, 'project_id': u'admin'} from (pid=5902) __call__ /usr/lib/python2.6/site-packages/routes/middleware.py:103


A workaround for openstack-nova is to remove:
/usr/lib/python2.6/site-packages/nova/api/openstack/contrib/flavorextraspecs.py
though there may be other issue not encountered yet.
Comment 2 Pádraig Brady 2012-04-10 13:50:46 EDT
The above issue impacted openstack diablo.

For reference another issue affecting the openstack essex release is,
this glance command:

glance -N http://192.168.122.106:5000/v2.0 -T glance-users -I admin -K secrete index

will throw:

File "/usr/lib/python2.6/site-packages/glance/api/middleware/cache_manage.py", line 80, in process_request
match = self._mapper.match(request.path, request.environ)

That's because the newer python-routes takes the environ parameter,
while the older does not.
Comment 3 RHEL Product and Program Management 2012-09-07 01:08:41 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
Comment 4 Alan Pevec 2013-11-28 11:59:38 EST
This was solved by introducing parallel installable python-routes1.12 package in EPEL6 and RHOS.

Note You need to log in before you can comment on or make changes to this bug.