Description of problem: Perhaps I have my system configured improperly, but the image-list functionality available through nova's python library appears broken. Unfortunately glance also appears broken in a different way. Other commands such as nova list and nova keypair operations appear to work properly. Version-Release number of selected component (if applicable): essex rc1 How reproducible: 100% even with master Steps to Reproduce: 1. run nova image-list 2. results in error code 500 (related to authentication) 3. Actual results: client prints: [root@beast heat]# nova --debug image-list connect: (127.0.0.1, 5000) send: 'POST /v2.0/tokens HTTP/1.1\r\nHost: 127.0.0.1:5000\r\nAccept-Encoding: identity\r\nContent-Length: 106\r\ncontent-type: application/json\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "verybadpass"}}}' reply: 'HTTP/1.1 200 OK\r\n' header: Content-Type: application/json header: Vary: X-Auth-Token header: Date: Fri, 23 Mar 2012 00:14:56 GMT header: Transfer-Encoding: chunked connect: (localhost, 8774) connect fail: (u'localhost', 8774) connect: (localhost, 8774) send: u'GET /v1.1/1c994e9029e146b9a7c310f75f758533/images/detail HTTP/1.1\r\nHost: localhost:8774\r\nx-auth-project-id: admin\r\nx-auth-token: 1c866b86c6f44ba688ff0dad6acf89cb\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n' reply: 'HTTP/1.1 500 Internal Server Error\r\n' header: Content-Length: 128 header: Content-Type: application/json; charset=UTF-8 header: X-Compute-Request-Id: req-87ddca8b-15c9-4a5f-9b2a-424a1ff0e605 header: Date: Fri, 23 Mar 2012 00:14:56 GMT DEBUG (shell:416) The server has either erred or is incapable of performing the requested operation. (HTTP 500) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/python_novaclient-2012.2-py2.7.egg/novaclient/shell.py", line 413, in main OpenStackComputeShell().main(sys.argv[1:]) File "/usr/lib/python2.7/site-packages/python_novaclient-2012.2-py2.7.egg/novaclient/shell.py", line 364, in main args.func(self.cs, args) File "/usr/lib/python2.7/site-packages/python_novaclient-2012.2-py2.7.egg/novaclient/v1_1/shell.py", line 350, in do_image_list image_list = cs.images.list() File "/usr/lib/python2.7/site-packages/python_novaclient-2012.2-py2.7.egg/novaclient/v1_1/images.py", line 47, in list return self._list("/images/detail", "images") File "/usr/lib/python2.7/site-packages/python_novaclient-2012.2-py2.7.egg/novaclient/base.py", line 71, in _list resp, body = self.api.client.get(url) File "/usr/lib/python2.7/site-packages/python_novaclient-2012.2-py2.7.egg/novaclient/client.py", line 136, in get return self._cs_request(url, 'GET', **kwargs) File "/usr/lib/python2.7/site-packages/python_novaclient-2012.2-py2.7.egg/novaclient/client.py", line 124, in _cs_request **kwargs) File "/usr/lib/python2.7/site-packages/python_novaclient-2012.2-py2.7.egg/novaclient/client.py", line 107, in request raise exceptions.from_response(resp, body) ClientException: The server has either erred or is incapable of performing the requested operation. (HTTP 500) ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) The server prints: 2012-03-22 17:14:56 INFO nova.api.openstack.wsgi [req-87ddca8b-15c9-4a5f-9b2a-424a1ff0e605 69a0c67d202543fcbee7a28c14c3204e 1c994e9029e146b9a7c310f75f758533] GET http://localhost:8774/v1.1/1c994e9029e146b9a7c310f75f758533/images/detail 2012-03-22 17:14:56 ERROR nova.api.openstack [req-87ddca8b-15c9-4a5f-9b2a-424a1ff0e605 69a0c67d202543fcbee7a28c14c3204e 1c994e9029e146b9a7c310f75f758533] Caught error: You are not authenticated. Details: 401 Unauthorized This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required. Authentication required (nova.api.openstack): TRACE: Traceback (most recent call last): (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/nova/api/openstack/__init__.py", line 41, in __call__ (nova.api.openstack): TRACE: return req.get_response(self.application) (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/webob/request.py", line 1086, in get_response (nova.api.openstack): TRACE: application, catch_exc_info=False) (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/webob/request.py", line 1055, in call_application (nova.api.openstack): TRACE: app_iter = application(self.environ, start_response) (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/keystone/middleware/auth_token.py", line 176, in __call__ (nova.api.openstack): TRACE: return self.app(env, start_response) (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/webob/dec.py", line 159, in __call__ (nova.api.openstack): TRACE: return resp(environ, start_response) (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/webob/dec.py", line 159, in __call__ (nova.api.openstack): TRACE: return resp(environ, start_response) (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/webob/dec.py", line 159, in __call__ nova.api.openstack): TRACE: return resp(environ, start_response) (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/routes/middleware.py", line 131, in __call__ (nova.api.openstack): TRACE: response = self.app(environ, start_response) (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/webob/dec.py", line 159, in __call__ (nova.api.openstack): TRACE: return resp(environ, start_response) (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/webob/dec.py", line 147, in __call__ (nova.api.openstack): TRACE: resp = self.call_func(req, *args, **self.kwargs) (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/webob/dec.py", line 210, in call_func (nova.api.openstack): TRACE: return self.func(req, *args, **kwargs) (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py", line 803, in __call__ (nova.api.openstack): TRACE: content_type, body, accept) (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py", line 851, in _process_stack (nova.api.openstack): TRACE: action_result = self.dispatch(meth, request, action_args) (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py", line 926, in dispatch (nova.api.openstack): TRACE: return method(req=request, **action_args) (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/images.py", line 201, in detail (nova.api.openstack): TRACE: **page_params) (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/nova/image/glance.py", line 176, in detail (nova.api.openstack): TRACE: for image_meta in image_metas: (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/nova/image/glance.py", line 208, in _fetch_images (nova.api.openstack): TRACE: _reraise_translated_exception() (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/nova/image/glance.py", line 206, in _fetch_images (nova.api.openstack): TRACE: images = fetch_func(**kwargs) (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/glance/client.py", line 76, in get_images_detailed (nova.api.openstack): TRACE: res = self.do_request("GET", "/images/detail", params=params) (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 61, in wrapped (nova.api.openstack): TRACE: return func(self, *args, **kwargs) nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 420, in do_request (nova.api.openstack): TRACE: headers=headers) (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 75, in wrapped (nova.api.openstack): TRACE: return func(self, method, url, body, headers) (nova.api.openstack): TRACE: File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 534, in _do_request (nova.api.openstack): TRACE: raise exception.NotAuthenticated(res.read()) (nova.api.openstack): TRACE: NotAuthenticated: You are not authenticated. (nova.api.openstack): TRACE: Details: 401 Unauthorized (nova.api.openstack): TRACE: (nova.api.openstack): TRACE: This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required. (nova.api.openstack): TRACE: (nova.api.openstack): TRACE: Authentication required (nova.api.openstack): TRACE: 2012-03-22 17:14:56 INFO nova.api.openstack [req-87ddca8b-15c9-4a5f-9b2a-424a1ff0e605 69a0c67d202543fcbee7a28c14c3204e 1c994e9029e146b9a7c310f75f758533] http://localhost:8774/v1.1/1c994e9029e146b9a7c310f75f758533/images/detail returned with HTTP 500 Expected results: image list printed Additional info:
Using Latest F17 getting started guide from Alan solves this problem.
authtoken changed post essex-4, wiki instructions were update to reflect this: https://fedoraproject.org/wiki/Getting_started_with_OpenStack_on_Fedora_17#Configuring_Keystone_for_authentication Also note if it is upgrade, that api-paste configs changed, so be sure to either remove all /etc/<app> and reinstall RPMs or rename all .rpmnew config files.