Ask Your Question
0

Glance error 410: Error in store configuration, adding images to store is disabled.

asked 2017-07-19 01:59:12 -0500

xyue gravatar image

updated 2017-07-19 02:33:25 -0500

Hi guys, i am having errors when trying to upload images. Below is the error message

[root@controller ~]# openstack image create "cirros" \
>   --file cirros-0.3.5-x86_64-disk.img \
>   --disk-format qcow2 --container-format bare \
>   --public
410 Gone
Error in store configuration. Adding images to store is disabled.
    (HTTP N/A)
[root@controller ~]#

I have check the permission of the foler and it shows below

[root@controller glance]# ls -l
drw-r-xr-x. 2 glance glance 49 Jul 18 23:44 images
[root@controller glance]# pwd
/var/lib/glance

I have post the configuration for both api and registry at below.

glance-api.conf

[DEFAULT]
show_multiple_locations = false

[cors]
[cors.subdomain]

[database]
connection = mysql+pymysql://glance:glance123@controller/glance

[glance_store]
stores = file,http
default_store = file
filesystem_store_datadir = /var/lib/glance/images/
filesystem_store_metadata_file = none

[image_format]

[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = glance123

service_token_roles_required = True
[matchmaker_redis]
[oslo_concurrency]
[oslo_messaging_amqp]
[oslo_messaging_kafka]
[oslo_messaging_notifications]
[oslo_messaging_rabbit]
[oslo_messaging_zmq]
[oslo_middleware]
[oslo_policy]

[paste_deploy]
flavor = keystone

[profiler]
[store_type_location_strategy]
[task]
[taskflow_executor]

glance-registry.conf.

[DEFAULT]

[database]
connection = mysql+pymysql://glance:glance123@controller/glance

[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = glance123

[matchmaker_redis]
[oslo_messaging_amqp]
[oslo_messaging_kafka]
[oslo_messaging_notifications]
[oslo_messaging_rabbit]
[oslo_messaging_zmq]
[oslo_policy]

[paste_deploy]
flavor = keystone

[profiler]

Below is the message i can see from the log.

[root@controller ~]# tail /var/log/glance/api.log
2017-07-15 00:06:35.458 4156 WARNING keystonemiddleware.auth_token [-] AuthToken middleware is set with keystone_authtoken.service_token_roles_required set to False. This is backwards compatible but deprecated behaviour. Please set this to True.
2017-07-15 00:06:48.714 4186 WARNING keystonemiddleware.auth_token [-] AuthToken middleware is set with keystone_authtoken.service_token_roles_required set to False. This is backwards compatible but deprecated behaviour. Please set this to True.
2017-07-15 00:06:48.923 4186 INFO glance_store._drivers.filesystem [-] Directory to write image files does not exist (/var/lib/glance/images/). Creating.
2017-07-15 00:06:48.924 4186 ERROR glance_store._drivers.filesystem [-] Unable to create datadir: /var/lib/glance/images/
2017-07-15 00:06:48.924 4186 WARNING glance_store.driver [-] Failed to configure store correctly: Store filesystem could not be configured correctly. Reason: Unable to create datadir: /var/lib/glance/images/ Disabling add method.
2017-07-15 00:06:48.925 4186 INFO glance.common.wsgi [-] Starting 2 workers
2017-07-15 00:06:48.929 4215 INFO eventlet.wsgi.server [-] (4215) wsgi starting up on http://0.0.0.0:9292
2017-07-15 00:06:48.930 4186 INFO glance.common.wsgi [-] Started child 4215
2017-07-15 00:06:48.935 4186 INFO glance.common.wsgi [-] Started child 4216
2017-07-15 00:06:48.935 4216 INFO eventlet.wsgi.server [-] (4216) wsgi starting up on http://0.0.0.0:9292

[root@controller ~]# tail /var/log/glance/registry.log -n 30
2017-07-07 19:20:38.037 7807 INFO eventlet.wsgi.server [-] (7807) wsgi starting up on http://0.0.0.0:9191
2017-07-07 19:45:54.040 15123 WARNING keystonemiddleware.auth_token [-] AuthToken middleware is set with keystone_authtoken.service_token_roles_required set to False. This is ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-07-19 03:29:21 -0500

updated 2017-07-19 03:53:11 -0500

I would bet a considerable sum it's due to this:

Directory to write image files does not exist (/var/lib/glance/images). Creating.
Unable to create datadir: /var/lib/glance/images/

Now you say that the directory exists. Still, Glance seems to think it doesn't, so you need to check there. Perhaps /var/lib/glance permissions don't allow Glance to check? Perhaps it's due to SELinux?

EDIT: In case you use RHEL or similar: My cloud was created with Packstack and runs on Centos 7. I have:

# ls -Zd /var/lib/glance
drwxr-xr-x. glance nobody system_u:object_r:glance_var_lib_t:s0 /var/lib/glance

To ensure all is well, SELinux-wise, install openstack-selinux.

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: 2017-07-19 01:59:12 -0500

Seen: 2,360 times

Last updated: Jul 19 '17