Include python-routes 1.12 in Lucid PPA (openstack api doesn't work with lucid one)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nova (Ubuntu) |
Invalid
|
High
|
Unassigned |
Bug Description
If you're running ubuntu 10.04 and you installed routes via apt-get, then trying to run "nova list" causes an unhanded exception in nova-api
# nova list
invalid literal for int() with base 10: 'detail' (HTTP 500)
2011-04-04 21:30:50,311 DEBUG routes.middleware [-] Matched GET /servers/detail from (pid=21680) __call__ /usr/lib/
2011-04-04 21:30:50,311 DEBUG routes.middleware [-] Route path: 'servers/
2011-04-04 21:30:50,311 DEBUG routes.middleware [-] Match dict: {'action': u'show', 'server_id': u'detail', 'controller': <nova.api.
/v1.0/servers/
2011-04-04 21:30:50,312 ERROR nova.api.openstack [-] Caught error: invalid literal for int() with base 10: 'detail'
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
There's a number of tests that break with routes 1.11
e.g.
# nosetests nova/tests/
test_get_
=======
ERROR: test_get_
-------
Traceback (most recent call last):
File "/opt/nova/
self.
KeyError: 'server'
-------
/v1.0/servers/1
-------
-------
<migration log messages removed>
routes.middleware: DEBUG: Initialized with method overriding = True, and path info altering = True
routes.middleware: DEBUG: Initialized with method overriding = True, and path info altering = True
routes.middleware: DEBUG: Initialized with method overriding = True, and path info altering = True
routes.middleware: DEBUG: Initialized with method overriding = True, and path info altering = True
routes.middleware: DEBUG: Matched GET /servers/1
routes.middleware: DEBUG: Route path: 'servers/
routes.middleware: DEBUG: Match dict: {'server_id': u'1', 'req': <Request at 0x323d810 GET http://
nova.api.openstack: ERROR: Caught error: int() argument must be a string or a number, not 'NoneType'
Traceback (most recent call last):
File "/opt/nova/
return req.get_
File "/usr/lib/
application, catch_exc_
File "/usr/lib/
app_iter = application(
File "/usr/lib/
return resp(environ, start_response)
File "/usr/lib/
return resp(environ, start_response)
File "/usr/lib/
return resp(environ, start_response)
File "/usr/lib/
response = self.app(environ, start_response)
File "/usr/lib/
return resp(environ, start_response)
File "/usr/lib/
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/
return self.func(req, *args, **kwargs)
File "/opt/nova/
result = method(**arg_dict)
File "/opt/nova/
int(id))
TypeError: int() argument must be a string or a number, not 'NoneType'
-------
-------
Ran 1 test in 0.913s
FAILED (errors=1)
Upgrading to routes 1.12 (e.g. from PyPi) seems to fix the problem:
root@ubuntu:~# pip freeze | grep -i routes
Routes==1.11
root@ubuntu:~# aptitude show python-routes
Package: python-routes
State: installed
Automatically installed: no
Version: 1.11-1
Priority: optional
Section: universe/python
Maintainer: Ubuntu Developers <email address hidden>
Uncompressed Size: 205k
Depends: python-support (>= 0.90.0)
Recommends: python-webob
Suggests: python-paste
Description: Routing Recognition and Generation Tools
Routes is a Python re-implementation of the Rails routes system for mapping URLs to Controllers/Actions and generating URLs. Routes makes it easy to create
pretty and concise URLs that are RESTful with little effort.
Speedy and dynamic URL generation means you get a URL with minimal cruft (no big dangling query args). Shortcut features like Named Routes cut down on
repetitive typing.
Current features:
* Named Routes
* Sophisticated Route lookup and URL generation
* Wildcard path's before and after static parts
* Groupings syntax to allow flexible URLs to accommodate almost any need
* Sub-domain support built-in
* Conditional matching based on domain, cookies, HTTP method (RESTful), and more
* Easily extensible utilizing custom condition functions and route generation functions
* Extensive unit tests
Homepage: http://
root@ubuntu:~# aptitude remove python-routes -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
The following packages will be REMOVED:
python-routes
0 packages upgraded, 0 newly installed, 1 to remove and 52 not upgraded.
Need to get 0B of archives. After unpacking 205kB will be freed.
Writing extended state information... Done
(Reading database ... 36941 files and directories currently installed.)
Removing python-routes ...
Processing triggers for python-support ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done
root@ubuntu:~# pip freeze | grep -i routes
Routes==1.12.3
root@ubuntu:~#
root@ubuntu:~# cd /opt/nova/
root@ubuntu:
test_get_
-------
Ran 1 test in 1.768s
OK
summary: |
- openstack api doesn't work with lucid python-routes + Include python-routes 1.12 in Lucid PPA (openstack api doesn't work with + lucid one) |
Not really a nova bug, but rather an Ubuntu PPA packaging issue