"glance index" returns "Invalid OpenStack Identity credentials."

asked 2012-11-07 06:54:34 -0600

theodotos gravatar image

Hi guys,

I am trying to follow the Ubuntu 12.04 Folsom installation guide from http://docs.openstack.org :

http://docs.openstack.org/trunk/openstack-compute/install/apt/content/osfolubuntu-imageservice.html (http://docs.openstack.org/trunk/opens...)

I went straight to Appendix B that describes the installation of a single node openstack system.

I reached the point where I should run "glance index". It gives:

glance index

ID Name Disk Format Container Format Size


Request returned failure status. None Invalid OpenStack Identity credentials.

In the logs I get:

tail /var/log/glance/api.log

2012-11-07 08:52:08 32427 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-11-07 08:52:08 32427 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-11-07 08:52:08 32427 DEBUG glance.api.middleware.version_negotiation [-] Matched version: v1 process_request /usr/lib/p ython2.7/dist-packages/glance/api/middleware/version_negotiation.py:70 2012-11-07 08:52:08 32427 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-11-07 08:52:08 32427 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-11-07 08:52:08 32427 WARNING keystone.middleware.auth_token [-] Authorization failed for token fffdeab396954d3cbc0785ae51ee5d9f 2012-11-07 08:52:08 32427 INFO keystone.middleware.auth_token [-] Invalid user token - rejecting request

Any idea what am I missing here?

My openstack status is 'newbie' :)

edit retag flag offensive close merge delete

17 answers

Sort by ยป oldest newest most voted
0

answered 2012-11-17 15:07:39 -0600

If I uncomment the "config_file" line in both glance-api.conf and glance-registry.conf it changes the behaviour. Now, instead of throwing that error it shows the table headers and hangs.

edit flag offensive delete link more
0

answered 2012-11-17 15:22:11 -0600

It seems the glance registry is looking for the glance-registry-paste.ini configuration file and cannot find it. It seems it's looking in the wrong place?

2012-11-17 15:19:05 28420 DEBUG glance.common.config [-] Loading glance-registry-keystone from /glance-registry-paste.ini load_paste_app /usr/$ 2012-11-17 15:19:05 28420 CRITICAL glance [-] [Errno 2] No such file or directory: '/glance-registry-paste.ini' 2012-11-17 15:19:05 28420 TRACE glance Traceback (most recent call last): 2012-11-17 15:19:05 28420 TRACE glance File "/usr/bin/glance-registry", line 51, in <module> 2012-11-17 15:19:05 28420 TRACE glance server.wait() 2012-11-17 15:19:05 28420 TRACE glance File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 241, in wait 2012-11-17 15:19:05 28420 TRACE glance self.wait_on_children() 2012-11-17 15:19:05 28420 TRACE glance File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 226, in wait_on_children 2012-11-17 15:19:05 28420 TRACE glance self.run_child() 2012-11-17 15:19:05 28420 TRACE glance File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 256, in run_child 2012-11-17 15:19:05 28420 TRACE glance self.run_server() 2012-11-17 15:19:05 28420 TRACE glance File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 275, in run_server 2012-11-17 15:19:05 28420 TRACE glance eventlet.wsgi.server(self.sock, self.app_func(), 2012-11-17 15:19:05 28420 TRACE glance File "/usr/lib/python2.7/dist-packages/glance/common/config.py", line 187, in load_paste_app 2012-11-17 15:19:05 28420 TRACE glance app = deploy.loadapp("config:%s" % conf_file, name=app_name) 2012-11-17 15:19:05 28420 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp 2012-11-17 15:19:05 28420 TRACE glance return loadobj(APP, uri, name=name, **kw) 2012-11-17 15:19:05 28420 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 271, in loadobj 2012-11-17 15:19:05 28420 TRACE glance global_conf=global_conf) 2012-11-17 15:19:05 28420 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext 2012-11-17 15:19:05 28420 TRACE glance global_conf=global_conf) 2012-11-17 15:19:05 28420 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 317, in _loadconfig 2012-11-17 15:19:05 28420 TRACE glance loader = ConfigLoader(path) 2012-11-17 15:19:05 28420 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 393, in __init__ 2012-11-17 15:19:05 28420 TRACE glance with open(filename) as f: 2012-11-17 15:19:05 28420 TRACE glance IOError: [Errno 2] No such file or directory: '/glance-registry-paste.ini' 2012-11-17 15:19:05 28420 TRACE glance

edit flag offensive delete link more
0

answered 2012-11-24 20:12:50 -0600

alxspb gravatar image

The problem is in the path to glance-registry-paste.ini file. In config /etc/glance/glance-registry.conf should be the full path to file, i.e /etc/glance/glance-registry-paste.ini instead of just glance-registry-paste.ini.

[paste_deploy]

Name of the paste configuration file that defines the available pipelines

config_file = /etc/glance/glance-registry-paste.ini

edit flag offensive delete link more
0

answered 2012-12-12 14:58:47 -0600

theodotos gravatar image

I am getting closer but apparently not close enough:

I get this when i use the admin tenant id:

glance --os-username admin --os-password novapass --os-tenant-id 54c2477b694048eba9921727f8f8e579 --os-auth-url http:/10.211.55.17/:5000/v2.0/ index

ID Name Disk Format Container Format Size


Request returned failure status. None Invalid OpenStack Identity credentials.

and this when I use the service tenant id:

glance --os-username admin --os-password novapass --os-tenant-id b380a00d1a454084ad5b10bdcb06cb72 --os-auth-url http://10.211.55.17:5000/v2.0/ index

No handlers could be found for logger "keystoneclient.client" Invalid tenant (HTTP 401)

Apparently the fisrt command is more"correct" than the latter but still not working. Any other ideas?

edit flag offensive delete link more
0

answered 2012-12-30 08:26:55 -0600

According to hnkhs (hnkhs) 's comment #11 , It works in my test env :)

edit flag offensive delete link more
0

answered 2013-01-30 07:45:55 -0600

If you remove: flavor = keystone

from the files: /etc/glance/glance-api.conf and /etc/glance/glance-registry.conf

then restart (service glance-api restart && service glance-registry restart) and rebuild the DB (glance-manage db_sync) it will work well.

edit flag offensive delete link more
0

answered 2013-03-13 21:38:50 -0600

Julian -- you don't want to remove keystone. I think the real problem here is outlined at https://bugs.launchpad.net/nova/+bug/1065211 (https://bugs.launchpad.net/nova/+bug/...)

In short, you need to make sure that all the usernames, tenant names, and passwords match between ALL of your OpenStack configuration files. You need this in all the respective *.conf files, as well as all the respective *-paste.ini files. If your username/tenant name/password in one place is something like admin/admin/openstack and it is shown as %ADMIN_USER%/%ADMIN_TENANT%/%ADMIN_PASSWORD% in a different file, then that won't work.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2012-11-07 06:54:34 -0600

Seen: 2,000 times

Last updated: Mar 13 '13