Glance Commands: Invalid Credentials [closed]

asked 2015-02-23 21:00:16 -0600

ALU.RDC gravatar image

updated 2015-02-25 11:05:37 -0600

Ok, so before I punch a hole into my laptop, let me open up a question for you all... I'll try to provide as much background, up front to prevent a long dialogue. I'm trying to run Openstack on one single device. I have keystone installed, and it's running fine. I can get tokens, add services, tenants, users etc... I went to install and configure glance, and it's giving me a ton of issues. I'm running Opensuse 13.1, trying to install the juno series of openstack.

I installed glance successfully, and configured the glance-api and glance-registry conf files according to the documentation. But everytime I run any glance based command such as ' glance index ' or ' glance image-list ' Basically any glance based command will give me the same error. So I can't create any images. Now before you jump to assume it's a username/password issue, let me give you the full logs and errors.

Ok so first off these are my environment variables:


My api / registry configs are pretty much mirrors of the auth_token section

This is the /etc/glance/glance-api.conf

#auth_host =
#auth_port = 35357
#auth_protocol = http
auth_uri = http://localhost:5000/v2.0
identity_uri = http://localhost:35357
admin_tenant_name = service
admin_user = admin
admin_password = <passwordforglance>

Note which ones are commented out and which ones are active

Below is my /etc/glance/glance-registry.conf

#auth_host =
#auth_port = 35357
#auth_protocol = http
identity_uri = http://localhost:35357
auth_uri = http://localhost:5000/v2.0
admin_tenant_name = service
admin_user = glance
admin_password = <passwordforglance>

Please note which ones are commented out and the the passwords, which differ from the environment variable. Hopefully it's correct so far.

Ok, so let's move onto a big question... in the documentation for Juno it says that the connection = mysql statement should be under the [database] header. Well the problem with that there is NO [database] header. In both glance-api.conf and glance-registry.conf there is a [sql] header. Should I put my connection = mysql:// in the [sql] section, or create the [database] header and put the connection statement in there?

here's what my file looks like:

connection = mysql://glance:csc3gadm@localhost/glance
#connection = sqlite:////var/lib/glance/glance.db

Note that I commented out the previous connection. Should I do this? Or should I add the connection = mysql:// and leave the connection = sqlite statement in as well?

Okay, so there's also the following error...whenever I try to do a glance db_sync, it sends and creates a file called. /var/lib/glance/glance.sqlite Should this happened? There is NOTHING inside the mysql glance table. But yet my glance confs have all of the default sqlite statements, commented out. How is this still happening? On both conf files i have my mysql commands set, yet it doesn't seem to matter.

So finally my main question ... (more)

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Yashpal Beppurana
close date 2015-03-03 08:59:57.440123


The problem with respect to the above problem was, Mr. Steven unknowingly downloaded Havana packages and started configuring OpenStack with Juno installation guide

Yashpal Beppurana gravatar imageYashpal Beppurana ( 2015-03-03 09:02:42 -0600 )edit

3 answers

Sort by ยป oldest newest most voted

answered 2015-02-23 21:23:02 -0600

rohit gravatar image

updated 2015-02-23 21:23:18 -0600

Did you grant admin role to your user glance?

keystone user-role-add --user glance --tenant service --role admin

edit flag offensive delete link more


Yep, The output was included in my original post... Is there a command to verify it just incase? Doing a keystone user-list just shows that the user exists. Is there a way to show which role each one has?

ALU.RDC gravatar imageALU.RDC ( 2015-02-24 12:24:48 -0600 )edit

Hey Bell, I guess the usage of command "keystone user-role-list" would do to list roles granted to a user. Also by just typing keystone or glance or nova etc and hitting enter key will give you a list command arguments and options. Hope that helps you.

Yashpal Beppurana gravatar imageYashpal Beppurana ( 2015-02-25 00:04:18 -0600 )edit

Hmmm I only see admin sign of glance user role...

ALU.RDC gravatar imageALU.RDC ( 2015-02-25 10:51:03 -0600 )edit

answered 2015-02-23 23:40:00 -0600

hey there,

too big explanation,

  1. the first part which i want to answer is about the database section, if its not available then you have to create one and do configurations. there is a command to remove sqlite rm -f /var/lib/glance/glance.sqlite after this manually comment out sqlite statements then save it and restart the service.

  2. the tables for the glance database. After su -s /bin/sh -c "glance-manage db_sync" glance this command returns no output. manually login to mysql and check for tables which are loaded in glance database, if there are no tables then you cant move further. if this issues hit which means the glance user is not provided with admin_role.

  3. errors can be fixed by looking at logs so immediately after hitting this error go to /var/log/keystone/* and similar services are stored, so instead of big explanation post logs.

edit flag offensive delete link more


still nothing.. this is what i get: su -s /bin/sh -c "glance-manage db_sync" glance Traceback (most recent call last): File "/usr/bin/glance-manage", line 10, in <module> sys.exit(main()) File "/usr/lib/python2.7/site-packages/glance/cmd/", line 121, in main usage="%(prog)s [op

ALU.RDC gravatar imageALU.RDC ( 2015-02-24 12:56:28 -0600 )edit

tions] <cmd>") File "/usr/lib/python2.7/site-packages/glance/common/", line 107, in parse_args default_config_files=default_config_files) File "/usr/lib/python2.7/site-packages/oslo/config/", line 1634, in __call__ raise ConfigFilesNotFoundError(self._namespace.files_not_f

ALU.RDC gravatar imageALU.RDC ( 2015-02-24 12:56:41 -0600 )edit

ound) oslo.config.cfg.ConfigFilesNotFoundError: Failed to read some config files: /etc/glance/glance-registry.conf

ALU.RDC gravatar imageALU.RDC ( 2015-02-24 12:56:55 -0600 )edit

yet I have this:

What protocol to use when connecting to the registry server?

Set to https for secure HTTP communication

registry_client_protocol = http

ALU.RDC gravatar imageALU.RDC ( 2015-02-24 13:04:20 -0600 )edit

answered 2015-02-23 23:24:43 -0600

updated 2015-02-23 23:31:28 -0600

Hi Bell,

  • Contents of glance log file will helpful in troubleshooting, can you post them over here?
  • With respect to the glance conf file, the header is [database]. I don't know how you have [sql] over there? May be this is new changes w.r.t Juno
  • I believe the problem is in the service endpoint. Do the following

Delete glance service endpoint and recreate the same, that is

$keystone endpoint-delete service-id

$keystone service-create --name glance --type image --description "OpenStack Image Service"

$keystone endpoint-create --service-id the-service-id --publicurl http://controller:9292 --internalurl http://controller:9292 --adminurl http://controller:9292 --region regionOne
edit flag offensive delete link more


I don't think it's the endpoint, I've run through that series of commands a few times already: I have a brand new service I create with the name glance, then I create the new endpoint, and use the id of that service... The only thing I did was use instead of controller name

ALU.RDC gravatar imageALU.RDC ( 2015-02-24 12:46:46 -0600 )edit

Which glance log should I be posting, api.log or registry.log?

ALU.RDC gravatar imageALU.RDC ( 2015-02-24 12:47:34 -0600 )edit

hmmm looking at seems to be trying https instead of http? could this be part of the issue?

ALU.RDC gravatar imageALU.RDC ( 2015-02-24 13:03:01 -0600 )edit

Okay Bell, I have few suggestions/questions for you.

  1. You have commented `#auth_host, #auth_port, #auth_protocol in glance-api.conf and glance-registry.conf, please uncomment them.
  2. I want know what keystone user-list says?
  3. Does glance database has tables, that is, did glance db-sync work
Yashpal Beppurana gravatar imageYashpal Beppurana ( 2015-02-24 23:57:09 -0600 )edit

Usage of HTTP/HTTPS doesn't matter. The only thing with your setup, you need some protocol to connect different OpenStack services.

Yashpal Beppurana gravatar imageYashpal Beppurana ( 2015-02-24 23:59:09 -0600 )edit

Can you post the contents of glance-api.conf, glance-registry.conf and their respective log files?

Yashpal Beppurana gravatar imageYashpal Beppurana ( 2015-02-25 00:00:24 -0600 )edit

I have a limit of like 300 characters, so I'll post the glance-api.conf and registry.conf files in the original post. I will post the results of keystone user-list there as well. I will uncomment the auth_host etc.. And no, no tables in glance db...glance db_sync doesn't appear to work...Thanks!

ALU.RDC gravatar imageALU.RDC ( 2015-02-25 10:36:59 -0600 )edit

Yashpal, I have edited my original post with your requests. The keystone user-list indeed does not show the glance user. I posted the --debug information in the original post, under today's date.

ALU.RDC gravatar imageALU.RDC ( 2015-02-25 11:09:35 -0600 )edit

Hi Bell, I use Icehouse release. Thanks to you, I went through the Installation guide and glance configuration files in Juno. Your say on uncommenting those three lines is correct. Okay, by looking at your configuration files, I really didn't understand why there is [sql] header in place of

Yashpal Beppurana gravatar imageYashpal Beppurana ( 2015-02-26 02:31:48 -0600 )edit

(continue) [database], also, i didn't find [glance_store] too. Well, if you can share your email-id with me, I will send you glance*.conf along with changes or another way is to purge glance packages and then to reinstall

Yashpal Beppurana gravatar imageYashpal Beppurana ( 2015-02-26 02:36:13 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-02-23 21:00:16 -0600

Seen: 527 times

Last updated: Feb 25 '15