Ask Your Question
0

glance and keystone configuration

asked 2011-09-19 12:05:43 -0500

tamas-kapolnasi gravatar image

I've tried configuring glance with keystone, but glance index command says that it's not authorized.

Where is the error in my configuration?

Thanks for your help. Thomas

glance -v --host 127.0.0.1 --auth_token 999888777666 index

Failed to show index. Got error: Internal Server error: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 336, in handle_one_response result = self.application(self.environ, start_response) File "/usr/lib/pymodules/python2.7/webob/dec.py", line 147, in __call__ resp = self.call_func(req, args, self.kwargs) File "/usr/lib/pymodules/python2.7/webob/dec.py", line 208, in call_func return self.func(req, *args, *kwargs) File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 113, in __call__ response = req.get_response(self.application) File "/usr/lib/pymodules/python2.7/webob/request.py", line 1053, in get_response application, catch_exc_info=False) File "/usr/lib/pymodules/python2.7/webob/request.py", line 1022, in call_application app_iter = application(self.environ, start_response) File "/usr/lib/python2.7/dist-packages/keystone/middleware/auth_token.py", line 186, in __call__ return self._forward_request(env, start_response, proxy_headers) File "/usr/lib/python2.7/dist-packages/keystone/middleware/auth_token.py", line 310, in _forward_request return self.app(env, start_response) File "/usr/lib/pymodules/python2.7/webob/dec.py", line 147, in __call__ resp = self.call_func(req, args, *self.kwargs) File "/usr/lib/pymodules/python2.7/webob/dec.py", line 208, in call_func return self.func(req, args, *kwargs) File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 113, in __call__ response = req.get_response(self.application) File "/usr/lib/pymodules/python2.7/webob/request.py", line 1053, in get_response application, catch_exc_info=False) File "/usr/lib/pymodules/python2.7/webob/request.py", line 1022, in call_application app_iter = application(self.environ, start_response) File "/usr/lib/pymodules/python2.7/webob/dec.py", line 159, in __call__ return resp(environ, start_response) File "/usr/lib/pymodules/python2.7/routes/middleware.py", line 131, in __call__ response = self.app(environ, start_response) File "/usr/lib/pymodules/python2.7/webob/dec.py", line 159, in __call__ return resp(environ, start_response) File "/usr/lib/pymodules/python2.7/webob/dec.py", line 147, in __call__ resp = self.call_func(req, args, *self.kwargs) File "/usr/lib/pymodules/python2.7/webob/dec.py", line 208, in call_func return self.func(req, args, *kwargs) File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 311, in __call__ request, *action_args) File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 328, in dispatch return method(args, *kwargs) File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 112, in index *params) File "/usr/lib/python2.7/dist-packages/glance/registry/__init__.py", line 37, in get_images_list return c.get_images(kwargs) File "/usr/lib/python2.7/dist-packages/glance/registry/client.py", line 59, in get_images res = self.do_request("GET", "/images", params=params) File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 148, in do_request raise exception.NotAuthorized(res.read()) NotAuthorized: 401 Unauthorized

This server could ... (more)

edit retag flag offensive close merge delete

5 answers

Sort by ยป oldest newest most voted
0

answered 2011-09-19 12:27:42 -0500

tamas-kapolnasi gravatar image

I've found the solution:

/etc/glance/glance-api.conf: #pipeline = versionnegotiation authtoken context apiv1app pipeline = versionnegotiation tokenauth context apiv1app ... #[filter:authtoken] [filter:tokenauth]

/etc/glance/glance-registry.conf: #pipeline = authtoken keystone_shim context registryapp pipeline = tokenauth keystone_shim context registryapp ... #[filter:authtoken] [filter:tokenauth]

glance -v --host 127.0.0.1 --auth_token 999888777666 index

Completed in 0.0893 sec.

root@openstackdev:~/downloads# glance -v --host 127.0.0.1 -A 999888777666 --verbose add name="natty-server-amd64" is_public=true < natty-server-cloudimg-amd64.img Added new image with ID: 1 Returned the following metadata for the new image: checksum => bae737367f42c0590b972e572ade4288 container_format => ovf created_at => 2011-09-19T12:23:43 deleted => False deleted_at => None disk_format => raw id => 1 is_public => True location => file:///var/lib/glance/images/1 name => natty-server-amd64 owner => None properties => {} size => 1476395008 status => active updated_at => 2011-09-19T12:24:00 Completed in 16.3209 sec.

edit flag offensive delete link more
0

answered 2011-09-19 13:32:07 -0500

nicolas2bonfils gravatar image

Hi,

Can you put on http://paste.openstack.org , the sampledata you used because, I got the same probleme, got the same conf, but got a problem with the id of user( instead of "joeuser,joeadmin, admin, serviceadmin, disabled", I have numbers : 1, 2, 3, 4, 5)

Thanks

--- Nicolas

edit flag offensive delete link more
0

answered 2011-09-20 12:24:11 -0500

tamas-kapolnasi gravatar image

I used this is default sampledata.sh (location ~keystone/bin/sampledata.sh): http://paste.openstack.org/show/2479/

T.

edit flag offensive delete link more
0

answered 2012-06-06 10:27:26 -0500

Hi Tamas Kapolnasi,

I fix files configuration of glance via your guide. When I run command "glance -v --host 127.0.0.1 --auth_token e0e8ac207b614f8fb42cf1031baa7570 --verbose add", output of command is "Completed in 0.003s" but still error in output as:

''' Failed to show index. Got error: The request returned 500 Internal Server Error ........................................................... ServiceUnavailable: The request returned 503 Service Unavilable. This generally occurs on service overload or other transient outage. '''

Can you help me?

edit flag offensive delete link more
0

answered 2012-06-18 21:58:29 -0500

Hi duypd,

I've found the same problem and a I've realized that the documentation is missing a change in the following file: /etc/glance/glance-registry-paste.ini

At the end of the file you have you have to change the following lines: {{{ admin_tenant_name = %SERVICE_TENANT_NAME% admin_user = %SERVICE_USER% admin_password = %SERVICE_PASSWORD% }}}

with: {{{ admin_tenant_name = service admin_user = glance admin_password = glance }}}

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-09-19 12:05:43 -0500

Seen: 78 times

Last updated: Jun 18 '12