<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; "><div>Brian,</div><div><br></div><div>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.</div><div><br></div><div>I have a few followup questions:</div><div> - After I update the two conf files, I restarted both the services.  Do I need to also issue "glance-manage db_sync".</div><div><br></div><div> - In glance-api.conf, sql_connection is pointing to sqlite db, which is not correct as I am using mysql in my setup.</div><div>        <b>sql_connection = sqlite:////var/lib/glance/glance.sqlite</b></div><div>   I am just curious as to why this is not causing any issue?</div><div>   If I did change the above conf line to point to mysql db, should I issue the command  "glance-manage db_sync".</div><div><br></div><div>- What does "glance-manage db_sync" really do.  What is populated in the db.</div><div><br></div><div><br></div><div>Thank you,</div><div>Ahmed.</div><div><br></div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Brian Waldon <<a href="mailto:bcwaldon@gmail.com">bcwaldon@gmail.com</a>><br><span style="font-weight:bold">Date: </span> Wednesday, October 31, 2012 4:49 PM<br><span style="font-weight:bold">To: </span> Ahmed Al-Mehdi <<a href="mailto:ahmed@coraid.com">ahmed@coraid.com</a>><br><span style="font-weight:bold">Cc: </span> "<a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a>" <<a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a>><br><span style="font-weight:bold">Subject: </span> Re: [Openstack] [Glance] "glance index" failing with "Request returned failure status"<br></div><div><br></div><blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;"><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
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:
<div><br></div><div>[paste_deploy]</div><div>flavor=keystone<br><div><br><div><div>On Oct 31, 2012, at 4:46 PM, Ahmed Al-Mehdi wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; "><div><div>Hello,</div><div><br></div><div>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.</div><div><br></div><div>root@bodega:~/ahmed/temp# glance index</div><div>ID                                   Name                           Disk Format          Container Format     Size          </div><div>------------------------------------ ------------------------------ -------------------- -------------------- --------------</div><div>Request returned failure status.</div><div>None</div><div>HTTPInternalServerError (HTTP 500)</div><div>root@bodega:~/ahmed/temp# </div></div><div><br></div><div><br></div><div><br></div><div>/var/log/api.log:</div><div><br></div><div><div>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</div><div>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</div><div>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</div><div>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</div><div>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</div><div>2012-10-31 16:16:50 DEBUG glance.common.client [0946431c-90d7-4063-8593-8d02ea89513a ce016bb05df949ebbafcc7c165359d7c ce1e819636744dc680fa5515f6475e87] Constructed URL:
<a href="http://0.0.0.0:9191/images/detail?limit=10">http://0.0.0.0:9191/images/detail?limit=10</a> _construct_url /usr/lib/python2.7/dist-packages/glance/common/client.py:464</div><div>2012-10-31 16:16:50 DEBUG glance.common.client [0946431c-90d7-4063-8593-8d02ea89513a ce016bb05df949ebbafcc7c165359d7c ce1e819636744dc680fa5515f6475e87] Constructed URL:
<a href="http://0.0.0.0:9191/images/detail?limit=10">http://0.0.0.0:9191/images/detail?limit=10</a> _construct_url /usr/lib/python2.7/dist-packages/glance/common/client.py:464</div><div>2012-10-31 16:16:50 ERROR glance.registry.client [0946431c-90d7-4063-8593-8d02ea89513a ce016bb05df949ebbafcc7c165359d7c ce1e819636744dc680fa5515f6475e87] Registry request GET /images/detail Exception</div><div>2012-10-31 16:16:50 4140 TRACE glance.registry.client Traceback (most recent call last):</div><div>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</div><div>2012-10-31 16:16:50 4140 TRACE glance.registry.client     action, **kwargs)</div><div>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</div><div>2012-10-31 16:16:50 4140 TRACE glance.registry.client     return func(self, *args, **kwargs)</div><div>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</div><div>2012-10-31 16:16:50 4140 TRACE glance.registry.client     headers=headers)</div><div>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</div><div>2012-10-31 16:16:50 4140 TRACE glance.registry.client     return func(self, method, url, body, headers)</div><div>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</div><div>2012-10-31 16:16:50 4140 TRACE glance.registry.client     raise exception.NotAuthenticated(res.read())</div><div>2012-10-31 16:16:50 4140 TRACE glance.registry.client NotAuthenticated: 401 Unauthorized</div><div>2012-10-31 16:16:50 4140 TRACE glance.registry.client </div><div>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.</div><div>2012-10-31 16:16:50 4140 TRACE glance.registry.client </div><div>2012-10-31 16:16:50 4140 TRACE glance.registry.client  Authentication required  </div><div>2012-10-31 16:16:50 4140 TRACE glance.registry.client </div></div><div><br></div><div><br></div><div>/var/log/registry.log:</div><div><br></div><div><div>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'}}</div><div>2012-10-31 16:16:50 4120 WARNING keystone.middleware.auth_token [-] Authorization failed for token f9b08f547be24e77a903bcdfa11ad1ac</div><div>2012-10-31 16:16:50 4120 INFO keystone.middleware.auth_token [-] Invalid user token - rejecting request</div><div>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'}</div><div>2012-10-31 16:16:50 4120 INFO keystone.middleware.auth_token [-] Invalid user token - rejecting request</div></div><div><br></div><div>Thank you,</div><div>Ahmed.</div><div><br></div><div><br></div></div>
_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp">https://help.launchpad.net/ListHelp</a><br></blockquote></div><br></div></div></div></div></blockquote></span></body></html>