Bug 808276

Summary: python-routes causes issues with the nova openstack REST API
Product: Red Hat Enterprise Linux 6 Reporter: Pádraig Brady <pbrady>
Component: python-routesAssignee: Pádraig Brady <pbrady>
Status: CLOSED CANTFIX QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2CC: apevec, derekh, fvollero
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-28 16:59:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pádraig Brady 2012-03-30 02:41:39 UTC
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 17:50:46 UTC
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 Program Management 2012-09-07 05:08:41 UTC
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 16:59:38 UTC
This was solved by introducing parallel installable python-routes1.12 package in EPEL6 and RHOS.