Ask Your Question
0

Unable to create Image to image Service on Stein

asked 2019-10-21 23:34:20 -0600

hyoukun gravatar image

Hello,

I'm trying to install glance on Openstack Stein on Ubuntu 18.04. I have managed to populate populate the image service database with "glance-manage db_sync" and this is the result in my database:

| Tables_in_glance                 |
+----------------------------------+
| alembic_version                  |
| image_locations                  |
| image_members                    |
| image_properties                 |
| image_tags                       |
| images                           |
| metadef_namespace_resource_types |
| metadef_namespaces               |
| metadef_objects                  |
| metadef_properties               |
| metadef_resource_types           |
| metadef_tags                     |
| migrate_version                  |
| task_info                        |
| tasks                            |
+----------------------------------+

I have configured the glance-api,conf and glance-registry.conf and when i tried to list the image or register the image with:

openstack image create "cirros" --file cirros-0.4.0-x86_64-disk.img --disk-format qcow2 --container-format bare --public

then got the error:

oslo_db.exception.DBConnectionError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'stack-controller' ([Errno 111] ECONNREFUSED)") (Background on this error at: http://sqlalche.me/e/e3q8)

stack-controller is my localhost hostname and i can reach it using domain or IP. and on my environment (ubuntu 18.04 - openstack stein) somehow i cant do the command:

service glance-registry restart  ##=> it said no service name it

but able to use command

service glance-api restart

please can anyone help, really need suggestion how to solve this

thanks

edit retag flag offensive close merge delete

Comments

Looks like the DB connection parameters in glance-api.conf are incorrect or your DB is down.

Registry is not necessarily deployed. It's deprecated anyway.

Bernd Bausch gravatar imageBernd Bausch ( 2019-10-21 23:55:09 -0600 )edit

this is my database configuration:

connection = mysql+pymysql://glance:mypassword@stack-controller/glance
backend = sqlalchemy

i make sure i can connect using this command to my database:

mysql -uglance -pmypassword -h stack-controller glance

btw, i can generate table using db_sync

hyoukun gravatar imagehyoukun ( 2019-10-22 00:47:12 -0600 )edit

since i can generate table, i think my database connection is ok, or glance image create and list command using different database configuration? i already make sure my [keystone_authtoken] is configured properly

hyoukun gravatar imagehyoukun ( 2019-10-22 00:49:38 -0600 )edit

This is not an authentication problem. Connection refused means Glance doesn't get connected to the DB. Either the connection string is incorrect, or the DB is down.

Bernd Bausch gravatar imageBernd Bausch ( 2019-10-22 01:01:50 -0600 )edit

hmm, any suggestion what configuration should i check? im just following the guide from openstack when configuring glance-api.conf on [database] , [keystone_authtoken], and [paste_deploy] sections

hyoukun gravatar imagehyoukun ( 2019-10-22 01:07:26 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2019-10-22 03:37:44 -0600

hyoukun gravatar image

After tweaking for some time finally it is working I changed the host in the connection by removing the dash "-". or change it completely to IP

from

connection = mysql+pymysql://glance:mypassword@stack-controller/glance

to

connection = mysql+pymysql://glance:mypassword@stackcontroller/glance
#require change in DNS or /etc/hosts

i dont know that is the limitation or rule of pymysql

but thanks for the suggestion guys

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2019-10-21 23:34:20 -0600

Seen: 16 times

Last updated: Oct 21