Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

glance with keystone authentication

Hi GUuys,

Having issue where user that creates snapshot does not see it. If I make it public, everyone is able to see it. Determined I needed to setup glance to authenticate with keystone.

Now getting error : glance image-list HTTPInternalServerError (HTTP 500) nova image-list ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500)

glance-api.conf and glance-registry.conf

   connection=mysql://glance:password@192.168.8.2/glance

   [keystone_authtoken]
    auth_uri = http://192.168.8.2:5000/v2.0
    auth_host = 192.168.8.2
    auth_port = 35357
    auth_protocol = http
    admin_tenant_name = service
    admin_user = glance
    admin_password = password

glance-api-paste.ini and glance-registry-paste.ini

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
delay_auth_decision = true
service_host = 192.168.8.2
service_port = 5000
service_protocol = http
auth_host = 192.168.8.2
auth_port = 35357
auth_protocol = http
auth_uri = http://192.168.8.2:5000/v2.0
admin_tenant_name = service
admin_user = glance
admin_password = password
admin_token = token in keystone.conf

glance-api log:

2015-03-10 15:20:45.239 3439 WARNING keystoneclient.middleware.auth_token [-] Unable to find authentication token in headers
2015-03-10 15:20:45.240 3439 DEBUG keystoneclient.middleware.auth_token [-] Headers: {'SERVER_PROTOCOL': 'HTTP/1.0', 'GATEWAY_INTERFACE': 'CGI/1.1', 'wsgi.version': (1, 0), 'SERVER_NAME': '192.168.8.6', 'RAW_PATH_INFO': '/', 'REMOTE_ADDR': '192.168.8.4', 'wsgi.run_once': False, 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fbb0f9e51e0>, 'wsgi.multiprocess': False, 'SCRIPT_NAME': '', 'SERVER_PORT': '9191', 'wsgi.url_scheme': 'http', 'REMOTE_PORT': '34077', 'wsgi.input': <eventlet.wsgi.Input object at 0x7fbb0a195f50>, 'REQUEST_METHOD': 'OPTIONS', 'PATH_INFO': '/', 'CONTENT_TYPE': 'text/plain', 'wsgi.multithread': True, 'eventlet.input': <eventlet.wsgi.Input object at 0x7fbb0a195f50>, 'eventlet.posthooks': []} _get_user_token_from_header /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:647
2015-03-10 15:20:45.240 3439 INFO keystoneclient.middleware.auth_token [-] Invalid user token - rejecting request
2015-03-10 15:20:45.241 3439 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:45] "OPTIONS / HTTP/1.0" 401 217 0.001938

glance registry.log

2015-03-10 15:20:31.828 3419 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 192.168.8.2
2015-03-10 15:20:31.829 3419 DEBUG urllib3.connectionpool [-] Setting read timeout to None _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:375
2015-03-10 15:20:31.853 3419 DEBUG urllib3.connectionpool [-] "GET /v2.0/tokens/revoked HTTP/1.1" 200 802 _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:415
2015-03-10 15:20:31.875 3419 DEBUG keystoneclient.middleware.auth_token [-] Storing token in cache _cache_put /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:1144
2015-03-10 15:20:31.876 3419 DEBUG keystoneclient.middleware.auth_token [-] Received request from user: cad5f3b0c3dd49b0a94b69ff137bb805 with project_id : a7aa587f802c414cbcef69c5697be358 and          roles: admin  _build_user_headers /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:933
2015-03-10 15:20:31.878 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Matched GET /images/detail          __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:100
2015-03-10 15:20:31.878 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Route path: '/images/detail         ', defaults: {'action': u'detail', 'controller': <glance.common.wsgi.Resource object at 0x7fb0dfc4db50>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:102
2015-03-10 15:20:31.879 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Match dict: {'action': u'de         tail', 'controller': <glance.common.wsgi.Resource object at 0x7fb0dfc4db50>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:103
2015-03-10 15:20:31.880 3419 DEBUG glance.common.client [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Constructed URL: http://         192.168.8.2:9191/images/detail?sort_key=name&sort_dir=asc&limit=20 _construct_url /usr/lib/python2.7/dist-packages/glance/common/client.py:411
2015-03-10 15:20:31.883 3419 INFO glance.registry.client.v1.client [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Registry clie         nt request GET /images/detail raised ServiceUnavailable
2015-03-10 15:20:31.884 3419 INFO glance.wsgi.server [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Traceback (most recent call          last):
  File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 384, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py", line 582, in __call__
    return self.app(env, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 206, in __call__
    return app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 644, in __call__
    request, **action_args)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 668, in dispatch
    return method(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 336, in detail
    images = registry.get_images_detail(req.context, **params)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/api.py", line 150, in get_images_detail
    return c.get_images_detailed(**kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 136, in get_images_detailed
    res = self.do_request("GET", "/images/detail", params=params)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 107, in do_request
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 66, in wrapped
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 386, in do_request
    headers=copy.deepcopy(headers))
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 83, in wrapped
    return func(self, method, url, body, headers)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 544, in _do_request
    raise exception.ServiceUnavailable(retry=_retry(res))
ServiceUnavailable: The request returned 503 Service Unavilable. This generally occurs on service overload or other transient outage.
2015-03-10 15:20:31.885 3419 INFO glance.wsgi.server [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] 192.168.8.4 - - [10/Mar/201         5 15:20:31] "GET /v1/images/detail?sort_key=name&sort_dir=asc&limit=20 HTTP/1.1" 500 139 0.062365
2015-03-10 15:20:33.535 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.535 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.536 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.537 3419 INFO glance.wsgi.server [-] 192.168.8.5 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002356
2015-03-10 15:20:33.540 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.540 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.541 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.542 3419 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002666
2015-03-10 15:20:33.549 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.550 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.550 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.551 3419 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002199
2015-03-10 15:20:33.552 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.553 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.553 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.554 3419 INFO glance.wsgi.server [-] 192.168.8.5 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002154

glance with keystone authentication

Hi GUuys,Guys,

Using Icehouse and Ubuntu 14.04

Having issue where user that creates snapshot does not see it. If I make it public, everyone is able to see it. Determined I needed to setup glance to authenticate with keystone.

Now getting error : glance image-list HTTPInternalServerError (HTTP 500) nova image-list ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500)

glance-api.conf and glance-registry.conf

   connection=mysql://glance:password@192.168.8.2/glance

   [keystone_authtoken]
    auth_uri = http://192.168.8.2:5000/v2.0
    auth_host = 192.168.8.2
    auth_port = 35357
    auth_protocol = http
    admin_tenant_name = service
    admin_user = glance
    admin_password = password

glance-api-paste.ini and glance-registry-paste.ini

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
delay_auth_decision = true
service_host = 192.168.8.2
service_port = 5000
service_protocol = http
auth_host = 192.168.8.2
auth_port = 35357
auth_protocol = http
auth_uri = http://192.168.8.2:5000/v2.0
admin_tenant_name = service
admin_user = glance
admin_password = password
admin_token = token in keystone.conf

glance-api log:

2015-03-10 15:20:45.239 3439 WARNING keystoneclient.middleware.auth_token [-] Unable to find authentication token in headers
2015-03-10 15:20:45.240 3439 DEBUG keystoneclient.middleware.auth_token [-] Headers: {'SERVER_PROTOCOL': 'HTTP/1.0', 'GATEWAY_INTERFACE': 'CGI/1.1', 'wsgi.version': (1, 0), 'SERVER_NAME': '192.168.8.6', 'RAW_PATH_INFO': '/', 'REMOTE_ADDR': '192.168.8.4', 'wsgi.run_once': False, 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fbb0f9e51e0>, 'wsgi.multiprocess': False, 'SCRIPT_NAME': '', 'SERVER_PORT': '9191', 'wsgi.url_scheme': 'http', 'REMOTE_PORT': '34077', 'wsgi.input': <eventlet.wsgi.Input object at 0x7fbb0a195f50>, 'REQUEST_METHOD': 'OPTIONS', 'PATH_INFO': '/', 'CONTENT_TYPE': 'text/plain', 'wsgi.multithread': True, 'eventlet.input': <eventlet.wsgi.Input object at 0x7fbb0a195f50>, 'eventlet.posthooks': []} _get_user_token_from_header /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:647
2015-03-10 15:20:45.240 3439 INFO keystoneclient.middleware.auth_token [-] Invalid user token - rejecting request
2015-03-10 15:20:45.241 3439 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:45] "OPTIONS / HTTP/1.0" 401 217 0.001938

glance registry.log

2015-03-10 15:20:31.828 3419 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 192.168.8.2
2015-03-10 15:20:31.829 3419 DEBUG urllib3.connectionpool [-] Setting read timeout to None _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:375
2015-03-10 15:20:31.853 3419 DEBUG urllib3.connectionpool [-] "GET /v2.0/tokens/revoked HTTP/1.1" 200 802 _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:415
2015-03-10 15:20:31.875 3419 DEBUG keystoneclient.middleware.auth_token [-] Storing token in cache _cache_put /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:1144
2015-03-10 15:20:31.876 3419 DEBUG keystoneclient.middleware.auth_token [-] Received request from user: cad5f3b0c3dd49b0a94b69ff137bb805 with project_id : a7aa587f802c414cbcef69c5697be358 and          roles: admin  _build_user_headers /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:933
2015-03-10 15:20:31.878 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Matched GET /images/detail          __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:100
2015-03-10 15:20:31.878 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Route path: '/images/detail         ', defaults: {'action': u'detail', 'controller': <glance.common.wsgi.Resource object at 0x7fb0dfc4db50>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:102
2015-03-10 15:20:31.879 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Match dict: {'action': u'de         tail', 'controller': <glance.common.wsgi.Resource object at 0x7fb0dfc4db50>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:103
2015-03-10 15:20:31.880 3419 DEBUG glance.common.client [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Constructed URL: http://         192.168.8.2:9191/images/detail?sort_key=name&sort_dir=asc&limit=20 _construct_url /usr/lib/python2.7/dist-packages/glance/common/client.py:411
2015-03-10 15:20:31.883 3419 INFO glance.registry.client.v1.client [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Registry clie         nt request GET /images/detail raised ServiceUnavailable
2015-03-10 15:20:31.884 3419 INFO glance.wsgi.server [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Traceback (most recent call          last):
  File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 384, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py", line 582, in __call__
    return self.app(env, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 206, in __call__
    return app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 644, in __call__
    request, **action_args)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 668, in dispatch
    return method(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 336, in detail
    images = registry.get_images_detail(req.context, **params)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/api.py", line 150, in get_images_detail
    return c.get_images_detailed(**kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 136, in get_images_detailed
    res = self.do_request("GET", "/images/detail", params=params)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 107, in do_request
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 66, in wrapped
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 386, in do_request
    headers=copy.deepcopy(headers))
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 83, in wrapped
    return func(self, method, url, body, headers)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 544, in _do_request
    raise exception.ServiceUnavailable(retry=_retry(res))
ServiceUnavailable: The request returned 503 Service Unavilable. This generally occurs on service overload or other transient outage.
2015-03-10 15:20:31.885 3419 INFO glance.wsgi.server [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] 192.168.8.4 - - [10/Mar/201         5 15:20:31] "GET /v1/images/detail?sort_key=name&sort_dir=asc&limit=20 HTTP/1.1" 500 139 0.062365
2015-03-10 15:20:33.535 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.535 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.536 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.537 3419 INFO glance.wsgi.server [-] 192.168.8.5 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002356
2015-03-10 15:20:33.540 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.540 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.541 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.542 3419 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002666
2015-03-10 15:20:33.549 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.550 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.550 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.551 3419 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002199
2015-03-10 15:20:33.552 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.553 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.553 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.554 3419 INFO glance.wsgi.server [-] 192.168.8.5 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002154

glance with keystone authentication

Hi Guys,

Using Icehouse and Ubuntu 14.0414.04 HAProxy 192.168.8.2 in front of 2 controllers.

Having issue where user that creates snapshot does not see it. If I make it public, everyone is able to see it. Determined I needed to setup glance to authenticate with keystone. Also ran glance-manage db_sync, and confirmed DB tables populated with images that worked prior to pointing to keystone.

Now getting error : glance image-list HTTPInternalServerError (HTTP 500) nova image-list ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500)

glance-api.conf and glance-registry.conf

   connection=mysql://glance:password@192.168.8.2/glance

   [keystone_authtoken]
    auth_uri = http://192.168.8.2:5000/v2.0
    auth_host = 192.168.8.2
    auth_port = 35357
    auth_protocol = http
    admin_tenant_name = service
    admin_user = glance
    admin_password = password

glance-api-paste.ini and glance-registry-paste.ini

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
delay_auth_decision = true
service_host = 192.168.8.2
service_port = 5000
service_protocol = http
auth_host = 192.168.8.2
auth_port = 35357
auth_protocol = http
auth_uri = http://192.168.8.2:5000/v2.0
admin_tenant_name = service
admin_user = glance
admin_password = password
admin_token = token in keystone.conf

glance-api log:

2015-03-10 15:20:45.239 3439 WARNING keystoneclient.middleware.auth_token [-] Unable to find authentication token in headers
2015-03-10 15:20:45.240 3439 DEBUG keystoneclient.middleware.auth_token [-] Headers: {'SERVER_PROTOCOL': 'HTTP/1.0', 'GATEWAY_INTERFACE': 'CGI/1.1', 'wsgi.version': (1, 0), 'SERVER_NAME': '192.168.8.6', 'RAW_PATH_INFO': '/', 'REMOTE_ADDR': '192.168.8.4', 'wsgi.run_once': False, 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fbb0f9e51e0>, 'wsgi.multiprocess': False, 'SCRIPT_NAME': '', 'SERVER_PORT': '9191', 'wsgi.url_scheme': 'http', 'REMOTE_PORT': '34077', 'wsgi.input': <eventlet.wsgi.Input object at 0x7fbb0a195f50>, 'REQUEST_METHOD': 'OPTIONS', 'PATH_INFO': '/', 'CONTENT_TYPE': 'text/plain', 'wsgi.multithread': True, 'eventlet.input': <eventlet.wsgi.Input object at 0x7fbb0a195f50>, 'eventlet.posthooks': []} _get_user_token_from_header /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:647
2015-03-10 15:20:45.240 3439 INFO keystoneclient.middleware.auth_token [-] Invalid user token - rejecting request
2015-03-10 15:20:45.241 3439 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:45] "OPTIONS / HTTP/1.0" 401 217 0.001938

glance registry.log

2015-03-10 15:20:31.828 3419 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 192.168.8.2
2015-03-10 15:20:31.829 3419 DEBUG urllib3.connectionpool [-] Setting read timeout to None _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:375
2015-03-10 15:20:31.853 3419 DEBUG urllib3.connectionpool [-] "GET /v2.0/tokens/revoked HTTP/1.1" 200 802 _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:415
2015-03-10 15:20:31.875 3419 DEBUG keystoneclient.middleware.auth_token [-] Storing token in cache _cache_put /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:1144
2015-03-10 15:20:31.876 3419 DEBUG keystoneclient.middleware.auth_token [-] Received request from user: cad5f3b0c3dd49b0a94b69ff137bb805 with project_id : a7aa587f802c414cbcef69c5697be358 and          roles: admin  _build_user_headers /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:933
2015-03-10 15:20:31.878 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Matched GET /images/detail          __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:100
2015-03-10 15:20:31.878 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Route path: '/images/detail         ', defaults: {'action': u'detail', 'controller': <glance.common.wsgi.Resource object at 0x7fb0dfc4db50>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:102
2015-03-10 15:20:31.879 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Match dict: {'action': u'de         tail', 'controller': <glance.common.wsgi.Resource object at 0x7fb0dfc4db50>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:103
2015-03-10 15:20:31.880 3419 DEBUG glance.common.client [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Constructed URL: http://         192.168.8.2:9191/images/detail?sort_key=name&sort_dir=asc&limit=20 _construct_url /usr/lib/python2.7/dist-packages/glance/common/client.py:411
2015-03-10 15:20:31.883 3419 INFO glance.registry.client.v1.client [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Registry clie         nt request GET /images/detail raised ServiceUnavailable
2015-03-10 15:20:31.884 3419 INFO glance.wsgi.server [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Traceback (most recent call          last):
  File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 384, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py", line 582, in __call__
    return self.app(env, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 206, in __call__
    return app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 644, in __call__
    request, **action_args)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 668, in dispatch
    return method(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 336, in detail
    images = registry.get_images_detail(req.context, **params)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/api.py", line 150, in get_images_detail
    return c.get_images_detailed(**kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 136, in get_images_detailed
    res = self.do_request("GET", "/images/detail", params=params)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 107, in do_request
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 66, in wrapped
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 386, in do_request
    headers=copy.deepcopy(headers))
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 83, in wrapped
    return func(self, method, url, body, headers)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 544, in _do_request
    raise exception.ServiceUnavailable(retry=_retry(res))
ServiceUnavailable: The request returned 503 Service Unavilable. This generally occurs on service overload or other transient outage.
2015-03-10 15:20:31.885 3419 INFO glance.wsgi.server [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] 192.168.8.4 - - [10/Mar/201         5 15:20:31] "GET /v1/images/detail?sort_key=name&sort_dir=asc&limit=20 HTTP/1.1" 500 139 0.062365
2015-03-10 15:20:33.535 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.535 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.536 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.537 3419 INFO glance.wsgi.server [-] 192.168.8.5 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002356
2015-03-10 15:20:33.540 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.540 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.541 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.542 3419 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002666
2015-03-10 15:20:33.549 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.550 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.550 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.551 3419 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002199
2015-03-10 15:20:33.552 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.553 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.553 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.554 3419 INFO glance.wsgi.server [-] 192.168.8.5 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002154

glance Glance with keystone authenticationKeystone authentication not working HELP!

Hi Guys,

Using Icehouse and Ubuntu 14.04 HAProxy 192.168.8.2 in front of 2 controllers.

Having issue where user that creates snapshot does not see it. If I make it public, everyone is able to see it. Determined I needed to setup glance to authenticate with keystone. Also ran glance-manage db_sync, and confirmed DB tables populated with images that worked prior to pointing to keystone.

Now getting error : glance image-list HTTPInternalServerError (HTTP 500) nova image-list ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500)

glance-api.conf and glance-registry.conf

   connection=mysql://glance:password@192.168.8.2/glance

   [keystone_authtoken]
    auth_uri = http://192.168.8.2:5000/v2.0
    auth_host = 192.168.8.2
    auth_port = 35357
    auth_protocol = http
    admin_tenant_name = service
    admin_user = glance
    admin_password = password

glance-api-paste.ini and glance-registry-paste.ini

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
delay_auth_decision = true
service_host = 192.168.8.2
service_port = 5000
service_protocol = http
auth_host = 192.168.8.2
auth_port = 35357
auth_protocol = http
auth_uri = http://192.168.8.2:5000/v2.0
admin_tenant_name = service
admin_user = glance
admin_password = password
admin_token = token in keystone.conf

glance-api log:

2015-03-10 15:20:45.239 3439 WARNING keystoneclient.middleware.auth_token [-] Unable to find authentication token in headers
2015-03-10 15:20:45.240 3439 DEBUG keystoneclient.middleware.auth_token [-] Headers: {'SERVER_PROTOCOL': 'HTTP/1.0', 'GATEWAY_INTERFACE': 'CGI/1.1', 'wsgi.version': (1, 0), 'SERVER_NAME': '192.168.8.6', 'RAW_PATH_INFO': '/', 'REMOTE_ADDR': '192.168.8.4', 'wsgi.run_once': False, 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fbb0f9e51e0>, 'wsgi.multiprocess': False, 'SCRIPT_NAME': '', 'SERVER_PORT': '9191', 'wsgi.url_scheme': 'http', 'REMOTE_PORT': '34077', 'wsgi.input': <eventlet.wsgi.Input object at 0x7fbb0a195f50>, 'REQUEST_METHOD': 'OPTIONS', 'PATH_INFO': '/', 'CONTENT_TYPE': 'text/plain', 'wsgi.multithread': True, 'eventlet.input': <eventlet.wsgi.Input object at 0x7fbb0a195f50>, 'eventlet.posthooks': []} _get_user_token_from_header /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:647
2015-03-10 15:20:45.240 3439 INFO keystoneclient.middleware.auth_token [-] Invalid user token - rejecting request
2015-03-10 15:20:45.241 3439 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:45] "OPTIONS / HTTP/1.0" 401 217 0.001938

glance registry.log

2015-03-10 15:20:31.828 3419 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 192.168.8.2
2015-03-10 15:20:31.829 3419 DEBUG urllib3.connectionpool [-] Setting read timeout to None _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:375
2015-03-10 15:20:31.853 3419 DEBUG urllib3.connectionpool [-] "GET /v2.0/tokens/revoked HTTP/1.1" 200 802 _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:415
2015-03-10 15:20:31.875 3419 DEBUG keystoneclient.middleware.auth_token [-] Storing token in cache _cache_put /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:1144
2015-03-10 15:20:31.876 3419 DEBUG keystoneclient.middleware.auth_token [-] Received request from user: cad5f3b0c3dd49b0a94b69ff137bb805 with project_id : a7aa587f802c414cbcef69c5697be358 and          roles: admin  _build_user_headers /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:933
2015-03-10 15:20:31.878 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Matched GET /images/detail          __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:100
2015-03-10 15:20:31.878 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Route path: '/images/detail         ', defaults: {'action': u'detail', 'controller': <glance.common.wsgi.Resource object at 0x7fb0dfc4db50>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:102
2015-03-10 15:20:31.879 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Match dict: {'action': u'de         tail', 'controller': <glance.common.wsgi.Resource object at 0x7fb0dfc4db50>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:103
2015-03-10 15:20:31.880 3419 DEBUG glance.common.client [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Constructed URL: http://         192.168.8.2:9191/images/detail?sort_key=name&sort_dir=asc&limit=20 _construct_url /usr/lib/python2.7/dist-packages/glance/common/client.py:411
2015-03-10 15:20:31.883 3419 INFO glance.registry.client.v1.client [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Registry clie         nt request GET /images/detail raised ServiceUnavailable
2015-03-10 15:20:31.884 3419 INFO glance.wsgi.server [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Traceback (most recent call          last):
  File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 384, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py", line 582, in __call__
    return self.app(env, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 206, in __call__
    return app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 644, in __call__
    request, **action_args)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 668, in dispatch
    return method(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 336, in detail
    images = registry.get_images_detail(req.context, **params)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/api.py", line 150, in get_images_detail
    return c.get_images_detailed(**kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 136, in get_images_detailed
    res = self.do_request("GET", "/images/detail", params=params)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 107, in do_request
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 66, in wrapped
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 386, in do_request
    headers=copy.deepcopy(headers))
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 83, in wrapped
    return func(self, method, url, body, headers)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 544, in _do_request
    raise exception.ServiceUnavailable(retry=_retry(res))
ServiceUnavailable: The request returned 503 Service Unavilable. This generally occurs on service overload or other transient outage.
2015-03-10 15:20:31.885 3419 INFO glance.wsgi.server [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] 192.168.8.4 - - [10/Mar/201         5 15:20:31] "GET /v1/images/detail?sort_key=name&sort_dir=asc&limit=20 HTTP/1.1" 500 139 0.062365
2015-03-10 15:20:33.535 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.535 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.536 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.537 3419 INFO glance.wsgi.server [-] 192.168.8.5 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002356
2015-03-10 15:20:33.540 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.540 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.541 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.542 3419 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002666
2015-03-10 15:20:33.549 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.550 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.550 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.551 3419 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002199
2015-03-10 15:20:33.552 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.553 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.553 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.554 3419 INFO glance.wsgi.server [-] 192.168.8.5 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002154

Glance with Keystone authentication not working HELP!

Hi Guys,

Using Icehouse and Ubuntu 14.04 HAProxy 192.168.8.2 in front of 2 controllers.

Having issue where user that creates snapshot does not see it. If I make it public, everyone is able to see it. Determined I needed to setup glance to authenticate with keystone. Also ran glance-manage db_sync, and confirmed DB tables populated with images that worked prior to pointing to keystone.

Now getting error : Weird thing the IP below is a public VIP, not configured in Glance at all.

glance image-list --debug image-list curl -i -X GET -H 'X-Auth-Token: MIIMUgYJKoZIhvcNAQcCoIIMQzCCDD8CAQExDTALBglghkgBZQMEAgEwggqgBgkqhkiG9w0BBwGgggqRBIIKjXsiYWNjZXNzIjogeyJ0b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ludHNfbGlua3MiOiBbXSwgInR5cGUiOiAiaWRlbnRpdHkiLCAibmFtZSI6ICJrZXlzdG9uZSJ9XSwgInVzZXIiOiB7InVzZXJuYW1lIjogImFkbWluIiwgInJvbGVzX2xpbmtzIjogW10sICJpZCI6ICJjYWQ1ZjNiMGMzZGQ0OWIwYTk0YjY5ZmYxMzdiYjgwNSIsICJyb2xlcyI6IFt7Im5hbWUiOiAiYWRtaW4ifV0sICJuYW1lIjogImFkbWluIn0sICJtZXRhZGF0YSI6IHsiaXNfYWRtaW4iOiAwLCAicm9sZXMiOiBbIjM0YTY3ZDc1YTQzMjQ2NWJiNjFiNTJkYzQ4MzVkMjUyIl19fX0xggGFMIIBgQIBATBcMFcxCzAJBgNVBAYTAlVTMQ4wDAYDVQQIDAVVbnNldDEOMAwGA1UEBwwFVW5zZXQxDjAMBgNVBAoMBVVuc2V0MRgwFgYDVQQDDA93d3cuZXhhbXBsZS5jb20CAQEwCwYJYIZIAWUDBAIBMA0GCSqGSIb3DQEBAQUABIIBAKYBU0Pi7fjXjvOGo2LoDiKO51MLhy1jzW0yLyQVZBzWmkuvR1Fc9T9BIZ+o3JDmls6JCOZWIX4ZpJJH0sRRZqQd9c3OpCBZhNYN3tHbcQoPtkw-tFAFf4xcG2yZpL1pn3-1ijkzwJVZpbEYoFpr+pzoHB891OfaHvy7WcDYfLDpVLuPjZMnDvvwgte9G+-ci+lODHY3P8O3JRT3CqjlymF548Mm8HpGA56FKp3aojsp59B33uVVfW8WA6qYmsIp0AGN1MCjQgsYJ6I7Fr1JhEshV7Gpsr52A900GTFDRVsOOw8LKd8xo5ejvM+1GsopyGQoLxYD97SjOaC8fegr9Z4=' -H 'Content-Type: application/json' -H 'User-Agent: python-glanceclient' http://24.246.120.231:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20

HTTP/1.1 500 Internal Server Error date: Wed, 11 Mar 2015 17:19:49 GMT content-length: 0 content-type: text/plain connection: close

Request returned failure status. HTTPInternalServerError (HTTP 500) nova image-list ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500)

glance-api.conf and glance-registry.conf

   connection=mysql://glance:password@192.168.8.2/glance

   [keystone_authtoken]
    auth_uri = http://192.168.8.2:5000/v2.0
    auth_host = 192.168.8.2
    auth_port = 35357
    auth_protocol = http
    admin_tenant_name = service
    admin_user = glance
    admin_password = password

glance-api-paste.ini and glance-registry-paste.ini

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
delay_auth_decision = true
service_host = 192.168.8.2
service_port = 5000
service_protocol = http
auth_host = 192.168.8.2
auth_port = 35357
auth_protocol = http
auth_uri = http://192.168.8.2:5000/v2.0
admin_tenant_name = service
admin_user = glance
admin_password = password
admin_token = token in keystone.conf

glance-api log:

2015-03-10 15:20:45.239 3439 WARNING keystoneclient.middleware.auth_token [-] Unable to find authentication token in headers
2015-03-10 15:20:45.240 3439 DEBUG keystoneclient.middleware.auth_token [-] Headers: {'SERVER_PROTOCOL': 'HTTP/1.0', 'GATEWAY_INTERFACE': 'CGI/1.1', 'wsgi.version': (1, 0), 'SERVER_NAME': '192.168.8.6', 'RAW_PATH_INFO': '/', 'REMOTE_ADDR': '192.168.8.4', 'wsgi.run_once': False, 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fbb0f9e51e0>, 'wsgi.multiprocess': False, 'SCRIPT_NAME': '', 'SERVER_PORT': '9191', 'wsgi.url_scheme': 'http', 'REMOTE_PORT': '34077', 'wsgi.input': <eventlet.wsgi.Input object at 0x7fbb0a195f50>, 'REQUEST_METHOD': 'OPTIONS', 'PATH_INFO': '/', 'CONTENT_TYPE': 'text/plain', 'wsgi.multithread': True, 'eventlet.input': <eventlet.wsgi.Input object at 0x7fbb0a195f50>, 'eventlet.posthooks': []} _get_user_token_from_header /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:647
2015-03-10 15:20:45.240 3439 INFO keystoneclient.middleware.auth_token [-] Invalid user token - rejecting request
2015-03-10 15:20:45.241 3439 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:45] "OPTIONS / HTTP/1.0" 401 217 0.001938

glance registry.log

2015-03-10 15:20:31.828 3419 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 192.168.8.2
2015-03-10 15:20:31.829 3419 DEBUG urllib3.connectionpool [-] Setting read timeout to None _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:375
2015-03-10 15:20:31.853 3419 DEBUG urllib3.connectionpool [-] "GET /v2.0/tokens/revoked HTTP/1.1" 200 802 _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:415
2015-03-10 15:20:31.875 3419 DEBUG keystoneclient.middleware.auth_token [-] Storing token in cache _cache_put /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:1144
2015-03-10 15:20:31.876 3419 DEBUG keystoneclient.middleware.auth_token [-] Received request from user: cad5f3b0c3dd49b0a94b69ff137bb805 with project_id : a7aa587f802c414cbcef69c5697be358 and          roles: admin  _build_user_headers /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:933
2015-03-10 15:20:31.878 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Matched GET /images/detail          __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:100
2015-03-10 15:20:31.878 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Route path: '/images/detail         ', defaults: {'action': u'detail', 'controller': <glance.common.wsgi.Resource object at 0x7fb0dfc4db50>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:102
2015-03-10 15:20:31.879 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Match dict: {'action': u'de         tail', 'controller': <glance.common.wsgi.Resource object at 0x7fb0dfc4db50>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:103
2015-03-10 15:20:31.880 3419 DEBUG glance.common.client [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Constructed URL: http://         192.168.8.2:9191/images/detail?sort_key=name&sort_dir=asc&limit=20 _construct_url /usr/lib/python2.7/dist-packages/glance/common/client.py:411
2015-03-10 15:20:31.883 3419 INFO glance.registry.client.v1.client [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Registry clie         nt request GET /images/detail raised ServiceUnavailable
2015-03-10 15:20:31.884 3419 INFO glance.wsgi.server [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Traceback (most recent call          last):
  File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 384, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py", line 582, in __call__
    return self.app(env, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 206, in __call__
    return app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 644, in __call__
    request, **action_args)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 668, in dispatch
    return method(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 336, in detail
    images = registry.get_images_detail(req.context, **params)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/api.py", line 150, in get_images_detail
    return c.get_images_detailed(**kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 136, in get_images_detailed
    res = self.do_request("GET", "/images/detail", params=params)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 107, in do_request
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 66, in wrapped
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 386, in do_request
    headers=copy.deepcopy(headers))
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 83, in wrapped
    return func(self, method, url, body, headers)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 544, in _do_request
    raise exception.ServiceUnavailable(retry=_retry(res))
ServiceUnavailable: The request returned 503 Service Unavilable. This generally occurs on service overload or other transient outage.
2015-03-10 15:20:31.885 3419 INFO glance.wsgi.server [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] 192.168.8.4 - - [10/Mar/201         5 15:20:31] "GET /v1/images/detail?sort_key=name&sort_dir=asc&limit=20 HTTP/1.1" 500 139 0.062365
2015-03-10 15:20:33.535 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.535 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.536 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.537 3419 INFO glance.wsgi.server [-] 192.168.8.5 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002356
2015-03-10 15:20:33.540 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.540 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.541 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.542 3419 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002666
2015-03-10 15:20:33.549 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.550 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.550 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.551 3419 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002199
2015-03-10 15:20:33.552 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.553 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.553 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.554 3419 INFO glance.wsgi.server [-] 192.168.8.5 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002154

Glance with Keystone authentication not working HELP!

Hi Guys,

Using Icehouse and Ubuntu 14.04 HAProxy 192.168.8.2 in front of 2 controllers.

Having issue where user that creates snapshot does not see it. If I make it public, everyone is able to see it. Determined I needed to setup glance to authenticate with keystone. Also ran glance-manage db_sync, and confirmed DB tables populated with images that worked prior to pointing to keystone.

Now getting error : Weird thing the IP below is a public VIP, not configured in Glance at all.

glance --debug image-list curl -i -X GET -H 'X-Auth-Token: MIIMUgYJKoZIhvcNAQ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MGUxYmQiLCAicHVibGljVVJMIjogImh0dHA6Ly8yNC4yNDYuMTIwLjIzMTo1MDAwL3YyLjAifV0sICJlbmRwb2ludHNfbGlua3MiOiBbXSwgInR5cGUiOiAiaWRlbnRpdHkiLCAibmFtZSI6ICJrZXlzdG9uZSJ9XSwgInVzZXIiOiB7InVzZXJuYW1lIjogImFkbWluIiwgInJvbGVzX2xpbmtzIjogW10sICJpZCI6ICJjYWQ1ZjNiMGMzZGQ0OWIwYTk0YjY5ZmYxMzdiYjgwNSIsICJyb2xlcyI6IFt7Im5hbWUiOiAiYWRtaW4ifV0sICJuYW1lIjogImFkbWluIn0sICJtZXRhZGF0YSI6IHsiaXNfYWRtaW4iOiAwLCAicm9sZXMiOiBbIjM0YTY3ZDc1YTQzMjQ2NWJiNjFiNTJkYzQ4MzVkMjUyIl19fX0xggGFMIIBgQIBATBcMFcxCzAJBgNVBAYTAlVTMQ4wDAYDVQQIDAVVbnNldDEOMAwGA1UEBwwFVW5zZXQxDjAMBgNVBAoMBVVuc2V0MRgwFgYDVQQDDA93d3cuZXhhbXBsZS5jb20CAQEwCwYJYIZIAWUDBAIBMA0GCSqGSIb3DQEBAQUABIIBAKYBU0Pi7fjXjvOGo2LoDiKO51MLhy1jzW0yLyQVZBzWmkuvR1Fc9T9BIZ+o3JDmls6JCOZWIX4ZpJJH0sRRZqQd9c3OpCBZhNYN3tHbcQoPtkw-tFAFf4xcG2yZpL1pn3-1ijkzwJVZpbEYoFpr+pzoHB891OfaHvy7WcDYfLDpVLuPjZMnDvvwgte9G+-ci+lODHY3P8O3JRT3CqjlymF548Mm8HpGA56FKp3aojsp59B33uVVfW8WA6qYmsIp0AGN1MCjQgsYJ6I7Fr1JhEshV7Gpsr52A900GTFDRVsOOw8LKd8xo5ejvM+1GsopyGQoLxYD97SjOaC8fegr9Z4=' -H 'Content-Type: application/json' -H 'User-Agent: python-glanceclient' http://24.246.120.231:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20

HTTP/1.1 500 Internal Server Error date: Wed, 11 Mar 2015 17:19:49 GMT content-length: 0 content-type: text/plain connection: close

Request returned failure status. HTTPInternalServerError (HTTP 500)

glance-api.conf and glance-registry.conf

   connection=mysql://glance:password@192.168.8.2/glance

   [keystone_authtoken]
    auth_uri = http://192.168.8.2:5000/v2.0
    auth_host = 192.168.8.2
    auth_port = 35357
    auth_protocol = http
    admin_tenant_name = service
    admin_user = glance
    admin_password = password

glance-api-paste.ini and glance-registry-paste.ini

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
delay_auth_decision = true
service_host = 192.168.8.2
service_port = 5000
service_protocol = http
auth_host = 192.168.8.2
auth_port = 35357
auth_protocol = http
auth_uri = http://192.168.8.2:5000/v2.0
admin_tenant_name = service
admin_user = glance
admin_password = password
admin_token = token in keystone.conf

glance-api log:

2015-03-10 15:20:45.239 3439 WARNING keystoneclient.middleware.auth_token [-] Unable to find authentication token in headers
2015-03-10 15:20:45.240 3439 DEBUG keystoneclient.middleware.auth_token [-] Headers: {'SERVER_PROTOCOL': 'HTTP/1.0', 'GATEWAY_INTERFACE': 'CGI/1.1', 'wsgi.version': (1, 0), 'SERVER_NAME': '192.168.8.6', 'RAW_PATH_INFO': '/', 'REMOTE_ADDR': '192.168.8.4', 'wsgi.run_once': False, 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fbb0f9e51e0>, 'wsgi.multiprocess': False, 'SCRIPT_NAME': '', 'SERVER_PORT': '9191', 'wsgi.url_scheme': 'http', 'REMOTE_PORT': '34077', 'wsgi.input': <eventlet.wsgi.Input object at 0x7fbb0a195f50>, 'REQUEST_METHOD': 'OPTIONS', 'PATH_INFO': '/', 'CONTENT_TYPE': 'text/plain', 'wsgi.multithread': True, 'eventlet.input': <eventlet.wsgi.Input object at 0x7fbb0a195f50>, 'eventlet.posthooks': []} _get_user_token_from_header /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:647
2015-03-10 15:20:45.240 3439 INFO keystoneclient.middleware.auth_token [-] Invalid user token - rejecting request
2015-03-10 15:20:45.241 3439 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:45] "OPTIONS / HTTP/1.0" 401 217 0.001938

glance registry.log

2015-03-10 15:20:31.828 3419 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 192.168.8.2
2015-03-10 15:20:31.829 3419 DEBUG urllib3.connectionpool [-] Setting read timeout to None _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:375
2015-03-10 15:20:31.853 3419 DEBUG urllib3.connectionpool [-] "GET /v2.0/tokens/revoked HTTP/1.1" 200 802 _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:415
2015-03-10 15:20:31.875 3419 DEBUG keystoneclient.middleware.auth_token [-] Storing token in cache _cache_put /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:1144
2015-03-10 15:20:31.876 3419 DEBUG keystoneclient.middleware.auth_token [-] Received request from user: cad5f3b0c3dd49b0a94b69ff137bb805 with project_id : a7aa587f802c414cbcef69c5697be358 and          roles: admin  _build_user_headers /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:933
2015-03-10 15:20:31.878 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Matched GET /images/detail          __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:100
2015-03-10 15:20:31.878 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Route path: '/images/detail         ', defaults: {'action': u'detail', 'controller': <glance.common.wsgi.Resource object at 0x7fb0dfc4db50>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:102
2015-03-10 15:20:31.879 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Match dict: {'action': u'de         tail', 'controller': <glance.common.wsgi.Resource object at 0x7fb0dfc4db50>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:103
2015-03-10 15:20:31.880 3419 DEBUG glance.common.client [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Constructed URL: http://         192.168.8.2:9191/images/detail?sort_key=name&sort_dir=asc&limit=20 _construct_url /usr/lib/python2.7/dist-packages/glance/common/client.py:411
2015-03-10 15:20:31.883 3419 INFO glance.registry.client.v1.client [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Registry clie         nt request GET /images/detail raised ServiceUnavailable
2015-03-10 15:20:31.884 3419 INFO glance.wsgi.server [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Traceback (most recent call          last):
  File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 384, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py", line 582, in __call__
    return self.app(env, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 206, in __call__
    return app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 644, in __call__
    request, **action_args)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 668, in dispatch
    return method(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 336, in detail
    images = registry.get_images_detail(req.context, **params)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/api.py", line 150, in get_images_detail
    return c.get_images_detailed(**kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 136, in get_images_detailed
    res = self.do_request("GET", "/images/detail", params=params)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 107, in do_request
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 66, in wrapped
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 386, in do_request
    headers=copy.deepcopy(headers))
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 83, in wrapped
    return func(self, method, url, body, headers)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 544, in _do_request
    raise exception.ServiceUnavailable(retry=_retry(res))
ServiceUnavailable: The request returned 503 Service Unavilable. This generally occurs on service overload or other transient outage.
2015-03-10 15:20:31.885 3419 INFO glance.wsgi.server [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] 192.168.8.4 - - [10/Mar/201         5 15:20:31] "GET /v1/images/detail?sort_key=name&sort_dir=asc&limit=20 HTTP/1.1" 500 139 0.062365
2015-03-10 15:20:33.535 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.535 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.536 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.537 3419 INFO glance.wsgi.server [-] 192.168.8.5 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002356
2015-03-10 15:20:33.540 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.540 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.541 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.542 3419 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002666
2015-03-10 15:20:33.549 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.550 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.550 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.551 3419 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002199
2015-03-10 15:20:33.552 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.553 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.553 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.554 3419 INFO glance.wsgi.server [-] 192.168.8.5 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002154

Glance with Keystone authentication not working HELP!

Hi Guys,

Using Icehouse and Ubuntu 14.04 HAProxy 192.168.8.2 in front of 2 controllers.

Having issue where user that creates snapshot does not see it. If I make it public, everyone is able to see it. Determined I needed to setup glance to authenticate with keystone. Also ran glance-manage db_sync, and confirmed DB tables populated with images that worked prior to pointing to keystone.

Now getting error :

glance --debug image-list
curl -i -X GET -H 'X-Auth-Token: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QyM2E3OWU4NGU5N2ViMGUxYmQiLCAicHVibGljVVJMIjogImh0dHA6Ly8yNC4yNDYuMTIwLjIzMTo1MDAwL3YyLjAifV0sICJlbmRwb2ludHNfbGlua3MiOiBbXSwgInR5cGUiOiAiaWRlbnRpdHkiLCAibmFtZSI6ICJrZXlzdG9uZSJ9XSwgInVzZXIiOiB7InVzZXJuYW1lIjogImFkbWluIiwgInJvbGVzX2xpbmtzIjogW10sICJpZCI6ICJjYWQ1ZjNiMGMzZGQ0OWIwYTk0YjY5ZmYxMzdiYjgwNSIsICJyb2xlcyI6IFt7Im5hbWUiOiAiYWRtaW4ifV0sICJuYW1lIjogImFkbWluIn0sICJtZXRhZGF0YSI6IHsiaXNfYWRtaW4iOiAwLCAicm9sZXMiOiBbIjM0YTY3ZDc1YTQzMjQ2NWJiNjFiNTJkYzQ4MzVkMjUyIl19fX0xggGFMIIBgQIBATBcMFcxCzAJBgNVBAYTAlVTMQ4wDAYDVQQIDAVVbnNldDEOMAwGA1UEBwwFVW5zZXQxDjAMBgNVBAoMBVVuc2V0MRgwFgYDVQQDDA93d3cuZXhhbXBsZS5jb20CAQEwCwYJYIZIAWUDBAIBMA0GCSqGSIb3DQEBAQUABIIBAKYBU0Pi7fjXjvOGo2LoDiKO51MLhy1jzW0yLyQVZBzWmkuvR1Fc9T9BIZ+o3JDmls6JCOZWIX4ZpJJH0sRRZqQd9c3OpCBZhNYN3tHbcQoPtkw-tFAFf4xcG2yZpL1pn3-1ijkzwJVZpbEYoFpr+pzoHB891OfaHvy7WcDYfLDpVLuPjZMnDvvwgte9G+-ci+lODHY3P8O3JRT3CqjlymF548Mm8HpGA56FKp3aojsp59B33uVVfW8WA6qYmsIp0AGN1MCjQgsYJ6I7Fr1JhEshV7Gpsr52A900GTFDRVsOOw8LKd8xo5ejvM+1GsopyGQoLxYD97SjOaC8fegr9Z4=' -H 'Content-Type: application/json' -H 'User-Agent: python-glanceclient' http://24.246.120.231:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20

http://24.246.120.231:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20

HTTP/1.1 500 Internal Server Error date: Wed, 11 Mar 2015 17:19:49 GMT content-length: 0 content-type: text/plain connection: close

Request returned failure status. HTTPInternalServerError (HTTP 500)

glance-api.conf and glance-registry.conf

   connection=mysql://glance:password@192.168.8.2/glance

   [keystone_authtoken]
    auth_uri = http://192.168.8.2:5000/v2.0
    auth_host = 192.168.8.2
    auth_port = 35357
    auth_protocol = http
    admin_tenant_name = service
    admin_user = glance
    admin_password = password

glance-api-paste.ini and glance-registry-paste.ini

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
delay_auth_decision = true
service_host = 192.168.8.2
service_port = 5000
service_protocol = http
auth_host = 192.168.8.2
auth_port = 35357
auth_protocol = http
auth_uri = http://192.168.8.2:5000/v2.0
admin_tenant_name = service
admin_user = glance
admin_password = password
admin_token = token in keystone.conf

glance-api log:

2015-03-10 15:20:45.239 3439 WARNING keystoneclient.middleware.auth_token [-] Unable to find authentication token in headers
2015-03-10 15:20:45.240 3439 DEBUG keystoneclient.middleware.auth_token [-] Headers: {'SERVER_PROTOCOL': 'HTTP/1.0', 'GATEWAY_INTERFACE': 'CGI/1.1', 'wsgi.version': (1, 0), 'SERVER_NAME': '192.168.8.6', 'RAW_PATH_INFO': '/', 'REMOTE_ADDR': '192.168.8.4', 'wsgi.run_once': False, 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fbb0f9e51e0>, 'wsgi.multiprocess': False, 'SCRIPT_NAME': '', 'SERVER_PORT': '9191', 'wsgi.url_scheme': 'http', 'REMOTE_PORT': '34077', 'wsgi.input': <eventlet.wsgi.Input object at 0x7fbb0a195f50>, 'REQUEST_METHOD': 'OPTIONS', 'PATH_INFO': '/', 'CONTENT_TYPE': 'text/plain', 'wsgi.multithread': True, 'eventlet.input': <eventlet.wsgi.Input object at 0x7fbb0a195f50>, 'eventlet.posthooks': []} _get_user_token_from_header /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:647
2015-03-10 15:20:45.240 3439 INFO keystoneclient.middleware.auth_token [-] Invalid user token - rejecting request
2015-03-10 15:20:45.241 3439 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:45] "OPTIONS / HTTP/1.0" 401 217 0.001938

glance registry.log

2015-03-10 15:20:31.828 3419 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 192.168.8.2
2015-03-10 15:20:31.829 3419 DEBUG urllib3.connectionpool [-] Setting read timeout to None _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:375
2015-03-10 15:20:31.853 3419 DEBUG urllib3.connectionpool [-] "GET /v2.0/tokens/revoked HTTP/1.1" 200 802 _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:415
2015-03-10 15:20:31.875 3419 DEBUG keystoneclient.middleware.auth_token [-] Storing token in cache _cache_put /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:1144
2015-03-10 15:20:31.876 3419 DEBUG keystoneclient.middleware.auth_token [-] Received request from user: cad5f3b0c3dd49b0a94b69ff137bb805 with project_id : a7aa587f802c414cbcef69c5697be358 and          roles: admin  _build_user_headers /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:933
2015-03-10 15:20:31.878 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Matched GET /images/detail          __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:100
2015-03-10 15:20:31.878 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Route path: '/images/detail         ', defaults: {'action': u'detail', 'controller': <glance.common.wsgi.Resource object at 0x7fb0dfc4db50>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:102
2015-03-10 15:20:31.879 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Match dict: {'action': u'de         tail', 'controller': <glance.common.wsgi.Resource object at 0x7fb0dfc4db50>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:103
2015-03-10 15:20:31.880 3419 DEBUG glance.common.client [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Constructed URL: http://         192.168.8.2:9191/images/detail?sort_key=name&sort_dir=asc&limit=20 _construct_url /usr/lib/python2.7/dist-packages/glance/common/client.py:411
2015-03-10 15:20:31.883 3419 INFO glance.registry.client.v1.client [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Registry clie         nt request GET /images/detail raised ServiceUnavailable
2015-03-10 15:20:31.884 3419 INFO glance.wsgi.server [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Traceback (most recent call          last):
  File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 384, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py", line 582, in __call__
    return self.app(env, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 206, in __call__
    return app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 644, in __call__
    request, **action_args)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 668, in dispatch
    return method(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 336, in detail
    images = registry.get_images_detail(req.context, **params)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/api.py", line 150, in get_images_detail
    return c.get_images_detailed(**kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 136, in get_images_detailed
    res = self.do_request("GET", "/images/detail", params=params)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 107, in do_request
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 66, in wrapped
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 386, in do_request
    headers=copy.deepcopy(headers))
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 83, in wrapped
    return func(self, method, url, body, headers)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 544, in _do_request
    raise exception.ServiceUnavailable(retry=_retry(res))
ServiceUnavailable: The request returned 503 Service Unavilable. This generally occurs on service overload or other transient outage.
2015-03-10 15:20:31.885 3419 INFO glance.wsgi.server [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] 192.168.8.4 - - [10/Mar/201         5 15:20:31] "GET /v1/images/detail?sort_key=name&sort_dir=asc&limit=20 HTTP/1.1" 500 139 0.062365
2015-03-10 15:20:33.535 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.535 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.536 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.537 3419 INFO glance.wsgi.server [-] 192.168.8.5 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002356
2015-03-10 15:20:33.540 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.540 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.541 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.542 3419 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002666
2015-03-10 15:20:33.549 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.550 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.550 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.551 3419 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002199
2015-03-10 15:20:33.552 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.553 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.553 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.554 3419 INFO glance.wsgi.server [-] 192.168.8.5 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002154

Glance with Keystone authentication not working HELP!

Hi Guys,

Using Icehouse and Ubuntu 14.04 HAProxy 192.168.8.2 in front of 2 controllers.

Having issue where user that creates snapshot does not see it. If I make it public, everyone is able to see it. Determined I needed to setup glance to authenticate with keystone. Also ran glance-manage db_sync, and confirmed DB tables populated with images that worked prior to pointing to keystone.

Now getting error :

glance --debug image-list
curl -i -X GET -H 'X-Auth-Token: MIIMUgYJKoZIhvcNAQcCoIIMQzCCDD8CAQExDTALBglghkgBZQMEAgEwggqgBgkqhkiG9w0BBwGgggqRBIIKjXsiYWNjZXNzIjogeyJ0b2tlbiI6IHsiaXNzdWVkX2F0IjogIjIwMTUtMDMtMTFUMTc6MTk6NDkuNjE1OTk1IiwgImV4cGlyZXMiOiAiMjAxNS0wMy0xMVQxODoxOTo0OVoiLCAiaWQiOiAicGxhY2Vob2xkZXIiLCAidGVuYW50IjogeyJkZXNjcmlwdGlvbiI6IG51bGwsICJlbmFibGVkIjogdHJ1ZSwgImlkIjogImE3YWE1ODdmODAyYzQxNGNiY2VmNjljNTY5N2JlMzU4IiwgIm5hbWUiOiAiYWRtaW4ifX0sICJzZXJ2aWNlQ2F0YWxvZyI6IFt7ImVuZHBvaW50cyI6IFt7ImFkbWluVVJMIjogImh0dHA6Ly8xOTIuMTY4LjguMjo4Nzc0L3YyL2E3YWE1ODdmODAyYzQxNGNiY2VmNjljNTY5N2JlMzU4IiwgInJlZ2lvbiI6ICJyZWdpb25PbmUiLCAiaW50ZXJuYWxVUkwiOiAiaHR0cDovLzE5Mi4xNjguOC4yOjg3NzQvdjIvYTdhYTU4N2Y4MDJjNDE0Y2JjZWY2OWM1Njk3YmUzNTgiLCAiaWQiOiAiMGViM2M1OTgzODkyNDZmNTg1ZWQyYzg5MTFiMGU2ODMiLCAicHVibGljVVJMIjogImh0dHA6Ly8yNC4yNDYuMTIwLjIzMTo4Nzc0L3YyL2E3YWE1ODdmODAyYzQxNGNiY2VmNjljNTY5N2JlMzU4In1dLCAiZW5kcG9pbnRzX2xpbmtzIjogW10sICJ0eXBlIjogImNvbXB1dGUiLCAibmFtZSI6ICJub3ZhIn0sIHsiZW5kcG9pbnRzIjogW3siYWRtaW5VUkwiOiAiaHR0cDovLzE5Mi4xNjguOC4yOjk2OTYvIiwgInJlZ2lvbiI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Content-Type: application/json' -H 'User-Agent: python-glanceclient' http://24.246.120.231:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20

HTTP/1.1 500 Internal Server Error date: Wed, 11 Mar 2015 17:19:49 GMT content-length: 0 content-type: text/plain connection: close

close

Request returned failure status. HTTPInternalServerError (HTTP 500)

glance-api.conf and glance-registry.conf

   connection=mysql://glance:password@192.168.8.2/glance

   [keystone_authtoken]
    auth_uri = http://192.168.8.2:5000/v2.0
    auth_host = 192.168.8.2
    auth_port = 35357
    auth_protocol = http
    admin_tenant_name = service
    admin_user = glance
    admin_password = password

glance-api-paste.ini and glance-registry-paste.ini

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
delay_auth_decision = true
service_host = 192.168.8.2
service_port = 5000
service_protocol = http
auth_host = 192.168.8.2
auth_port = 35357
auth_protocol = http
auth_uri = http://192.168.8.2:5000/v2.0
admin_tenant_name = service
admin_user = glance
admin_password = password
admin_token = token in keystone.conf

glance-api log:

2015-03-10 15:20:45.239 3439 WARNING keystoneclient.middleware.auth_token [-] Unable to find authentication token in headers
2015-03-10 15:20:45.240 3439 DEBUG keystoneclient.middleware.auth_token [-] Headers: {'SERVER_PROTOCOL': 'HTTP/1.0', 'GATEWAY_INTERFACE': 'CGI/1.1', 'wsgi.version': (1, 0), 'SERVER_NAME': '192.168.8.6', 'RAW_PATH_INFO': '/', 'REMOTE_ADDR': '192.168.8.4', 'wsgi.run_once': False, 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fbb0f9e51e0>, 'wsgi.multiprocess': False, 'SCRIPT_NAME': '', 'SERVER_PORT': '9191', 'wsgi.url_scheme': 'http', 'REMOTE_PORT': '34077', 'wsgi.input': <eventlet.wsgi.Input object at 0x7fbb0a195f50>, 'REQUEST_METHOD': 'OPTIONS', 'PATH_INFO': '/', 'CONTENT_TYPE': 'text/plain', 'wsgi.multithread': True, 'eventlet.input': <eventlet.wsgi.Input object at 0x7fbb0a195f50>, 'eventlet.posthooks': []} _get_user_token_from_header /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:647
2015-03-10 15:20:45.240 3439 INFO keystoneclient.middleware.auth_token [-] Invalid user token - rejecting request
2015-03-10 15:20:45.241 3439 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:45] "OPTIONS / HTTP/1.0" 401 217 0.001938

glance registry.log

2015-03-10 15:20:31.828 3419 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 192.168.8.2
2015-03-10 15:20:31.829 3419 DEBUG urllib3.connectionpool [-] Setting read timeout to None _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:375
2015-03-10 15:20:31.853 3419 DEBUG urllib3.connectionpool [-] "GET /v2.0/tokens/revoked HTTP/1.1" 200 802 _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:415
2015-03-10 15:20:31.875 3419 DEBUG keystoneclient.middleware.auth_token [-] Storing token in cache _cache_put /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:1144
2015-03-10 15:20:31.876 3419 DEBUG keystoneclient.middleware.auth_token [-] Received request from user: cad5f3b0c3dd49b0a94b69ff137bb805 with project_id : a7aa587f802c414cbcef69c5697be358 and          roles: admin  _build_user_headers /usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py:933
2015-03-10 15:20:31.878 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Matched GET /images/detail          __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:100
2015-03-10 15:20:31.878 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Route path: '/images/detail         ', defaults: {'action': u'detail', 'controller': <glance.common.wsgi.Resource object at 0x7fb0dfc4db50>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:102
2015-03-10 15:20:31.879 3419 DEBUG routes.middleware [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Match dict: {'action': u'de         tail', 'controller': <glance.common.wsgi.Resource object at 0x7fb0dfc4db50>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:103
2015-03-10 15:20:31.880 3419 DEBUG glance.common.client [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Constructed URL: http://         192.168.8.2:9191/images/detail?sort_key=name&sort_dir=asc&limit=20 _construct_url /usr/lib/python2.7/dist-packages/glance/common/client.py:411
2015-03-10 15:20:31.883 3419 INFO glance.registry.client.v1.client [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Registry clie         nt request GET /images/detail raised ServiceUnavailable
2015-03-10 15:20:31.884 3419 INFO glance.wsgi.server [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] Traceback (most recent call          last):
  File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 384, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py", line 582, in __call__
    return self.app(env, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 206, in __call__
    return app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 644, in __call__
    request, **action_args)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 668, in dispatch
    return method(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 336, in detail
    images = registry.get_images_detail(req.context, **params)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/api.py", line 150, in get_images_detail
    return c.get_images_detailed(**kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 136, in get_images_detailed
    res = self.do_request("GET", "/images/detail", params=params)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 107, in do_request
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 66, in wrapped
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 386, in do_request
    headers=copy.deepcopy(headers))
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 83, in wrapped
    return func(self, method, url, body, headers)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 544, in _do_request
    raise exception.ServiceUnavailable(retry=_retry(res))
ServiceUnavailable: The request returned 503 Service Unavilable. This generally occurs on service overload or other transient outage.
2015-03-10 15:20:31.885 3419 INFO glance.wsgi.server [d43b483a-46bd-4924-8de6-7ed210b99987 cad5f3b0c3dd49b0a94b69ff137bb805 a7aa587f802c414cbcef69c5697be358 - - -] 192.168.8.4 - - [10/Mar/201         5 15:20:31] "GET /v1/images/detail?sort_key=name&sort_dir=asc&limit=20 HTTP/1.1" 500 139 0.062365
2015-03-10 15:20:33.535 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.535 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.536 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.537 3419 INFO glance.wsgi.server [-] 192.168.8.5 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002356
2015-03-10 15:20:33.540 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.540 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.541 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.542 3419 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002666
2015-03-10 15:20:33.549 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.550 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.550 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.551 3419 INFO glance.wsgi.server [-] 192.168.8.4 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002199
2015-03-10 15:20:33.552 3419 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: OPTIONS / Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api         /middleware/version_negotiation.py:44
2015-03-10 15:20:33.553 3419 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiatio         n.py:57
2015-03-10 15:20:33.553 3419 DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. process_request /usr/lib/python2.7/dist-packages/glance/api/middle         ware/version_negotiation.py:64
2015-03-10 15:20:33.554 3419 INFO glance.wsgi.server [-] 192.168.8.5 - - [10/Mar/2015 15:20:33] "OPTIONS / HTTP/1.0" 300 697 0.002154