← Back to team overview

openstack team mailing list archive

Re: [Glance] "glance index" failing with "Request returned failure status"

 

Brian,

Thank you for your suggestion as it led me to figure out the issue.  I was providing the wrong admin_user / admin_password in both glance-api.conf and glance-registry.conf file.  Now, I do not get an error.

I have a few followup questions:
 - After I update the two conf files, I restarted both the services.  Do I need to also issue "glance-manage db_sync".

 - In glance-api.conf, sql_connection is pointing to sqlite db, which is not correct as I am using mysql in my setup.
        sql_connection = sqlite:////var/lib/glance/glance.sqlite
   I am just curious as to why this is not causing any issue?
   If I did change the above conf line to point to mysql db, should I issue the command  "glance-manage db_sync".

- What does "glance-manage db_sync" really do.  What is populated in the db.


Thank you,
Ahmed.


From: Brian Waldon <bcwaldon@xxxxxxxxx<mailto:bcwaldon@xxxxxxxxx>>
Date: Wednesday, October 31, 2012 4:49 PM
To: Ahmed Al-Mehdi <ahmed@xxxxxxxxxx<mailto:ahmed@xxxxxxxxxx>>
Cc: "openstack@xxxxxxxxxxxxxxxxxxx<mailto:openstack@xxxxxxxxxxxxxxxxxxx>" <openstack@xxxxxxxxxxxxxxxxxxx<mailto:openstack@xxxxxxxxxxxxxxxxxxx>>
Subject: Re: [Openstack] [Glance] "glance index" failing with "Request returned failure status"

My immediate thought is that you configured glance-registry to use keystone authentication but you didn't do the same for glance-api. Make sure you add the following to glance-registry.conf:

[paste_deploy]
flavor=keystone

On Oct 31, 2012, at 4:46 PM, Ahmed Al-Mehdi wrote:

Hello,

I followed the steps in "OpenStack Install and Deploy Manual – Ubuntu".  After following the steps to install Glance, I issued the command "glance index" to test my setup.  I am getting an error.  Can someone please help.

root@bodega:~/ahmed/temp# glance index
ID                                   Name                           Disk Format          Container Format     Size
------------------------------------ ------------------------------ -------------------- -------------------- --------------
Request returned failure status.
None
HTTPInternalServerError (HTTP 500)
root@bodega:~/ahmed/temp#



/var/log/api.log:

2012-10-31 16:16:49 4140 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: GET /v1/images/detail Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiation.py:45
2012-10-31 16:16:49 4140 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiation.py:58
2012-10-31 16:16:49 4140 DEBUG glance.api.middleware.version_negotiation [-] Matched version: v1 process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiation.py:70
2012-10-31 16:16:49 4140 DEBUG glance.api.middleware.version_negotiation [-] new uri /v1/images/detail process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiation.py:71
2012-10-31 16:16:50 DEBUG glance.api.policy [0946431c-90d7-4063-8593-8d02ea89513a ce016bb05df949ebbafcc7c165359d7c ce1e819636744dc680fa5515f6475e87] Loaded policy rules: {u'default': [], u'manage_image_cache': [[u'role:admin']]} load_rules /usr/lib/python2.7/dist-packages/glance/api/policy.py:63
2012-10-31 16:16:50 DEBUG glance.common.client [0946431c-90d7-4063-8593-8d02ea89513a ce016bb05df949ebbafcc7c165359d7c ce1e819636744dc680fa5515f6475e87] Constructed URL: http://0.0.0.0:9191/images/detail?limit=10 _construct_url /usr/lib/python2.7/dist-packages/glance/common/client.py:464
2012-10-31 16:16:50 DEBUG glance.common.client [0946431c-90d7-4063-8593-8d02ea89513a ce016bb05df949ebbafcc7c165359d7c ce1e819636744dc680fa5515f6475e87] Constructed URL: http://0.0.0.0:9191/images/detail?limit=10 _construct_url /usr/lib/python2.7/dist-packages/glance/common/client.py:464
2012-10-31 16:16:50 ERROR glance.registry.client [0946431c-90d7-4063-8593-8d02ea89513a ce016bb05df949ebbafcc7c165359d7c ce1e819636744dc680fa5515f6475e87] Registry request GET /images/detail Exception
2012-10-31 16:16:50 4140 TRACE glance.registry.client Traceback (most recent call last):
2012-10-31 16:16:50 4140 TRACE glance.registry.client   File "/usr/lib/python2.7/dist-packages/glance/registry/client.py", line 89, in do_request
2012-10-31 16:16:50 4140 TRACE glance.registry.client     action, **kwargs)
2012-10-31 16:16:50 4140 TRACE glance.registry.client   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 66, in wrapped
2012-10-31 16:16:50 4140 TRACE glance.registry.client     return func(self, *args, **kwargs)
2012-10-31 16:16:50 4140 TRACE glance.registry.client   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 444, in do_request
2012-10-31 16:16:50 4140 TRACE glance.registry.client     headers=headers)
2012-10-31 16:16:50 4140 TRACE glance.registry.client   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 80, in wrapped
2012-10-31 16:16:50 4140 TRACE glance.registry.client     return func(self, method, url, body, headers)
2012-10-31 16:16:50 4140 TRACE glance.registry.client   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 566, in _do_request
2012-10-31 16:16:50 4140 TRACE glance.registry.client     raise exception.NotAuthenticated(res.read())
2012-10-31 16:16:50 4140 TRACE glance.registry.client NotAuthenticated: 401 Unauthorized
2012-10-31 16:16:50 4140 TRACE glance.registry.client
2012-10-31 16:16:50 4140 TRACE glance.registry.client This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
2012-10-31 16:16:50 4140 TRACE glance.registry.client
2012-10-31 16:16:50 4140 TRACE glance.registry.client  Authentication required
2012-10-31 16:16:50 4140 TRACE glance.registry.client


/var/log/registry.log:

2012-10-31 16:16:50 4120 WARNING keystone.middleware.auth_token [-] Unexpected response from keystone service: {u'error': {u'message': u'Invalid tenant', u'code': 401, u'title': u'Not Authorized'}}
2012-10-31 16:16:50 4120 WARNING keystone.middleware.auth_token [-] Authorization failed for token f9b08f547be24e77a903bcdfa11ad1ac
2012-10-31 16:16:50 4120 INFO keystone.middleware.auth_token [-] Invalid user token - rejecting request
2012-10-31 16:16:50 4120 WARNING keystone.middleware.auth_token [-] Unable to find authentication token in headers: {'SCRIPT_NAME': '', 'REQUEST_METHOD': 'GET', 'PATH_INFO': '/images/detail', 'SERVER_PROTOCOL': 'HTTP/1.0', 'QUERY_STRING': 'limit=10', 'eventlet.posthooks': [], 'SERVER_NAME': '127.0.0.1', 'REMOTE_ADDR': '127.0.0.1', 'eventlet.input': <eventlet.wsgi.Input object at 0x27c4610>, 'wsgi.url_scheme': 'http', 'SERVER_PORT': '9191', 'wsgi.input': <eventlet.wsgi.Input object at 0x27c4610>, 'HTTP_HOST': '0.0.0.0:9191', 'wsgi.multithread': True, 'wsgi.version': (1, 0), 'RAW_PATH_INFO': '/images/detail', 'GATEWAY_INTERFACE': 'CGI/1.1', 'wsgi.run_once': False, 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7f2200192270>, 'wsgi.multiprocess': False, 'CONTENT_TYPE': 'text/plain', 'HTTP_ACCEPT_ENCODING': 'identity'}
2012-10-31 16:16:50 4120 INFO keystone.middleware.auth_token [-] Invalid user token - rejecting request

Thank you,
Ahmed.


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack@xxxxxxxxxxxxxxxxxxx<mailto:openstack@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


References