How to configure glance to store images created by "glance image-create" in a remote machine which have nfs server? [closed]
I have configured openstack controller in 192.168.1.10
I have NFS server configured in 192.168.1.20 and in the same machine /images I want to store all the images which will be created by "glance image-create" command .. I have put cirros-0.3.3-x86_64-disk.img file in /images folder in 192.168.1.20 and /images folder is mountable...
Currently the default path of the "glance image-create" is /var/lib/glance/images (which is openstack's default) in 192.168.1.10 where I have configured the controller
The NFS server at 192.168.1.20 will be dedicated for images..
In controller that is 192.168.1.10 I have mounted 192.168.1.20's/images folder in /images.
So to configure as above I changed the glance-api.conf file as " .... [glance_store] ..... filesystem_store_datadir = /images ..... " So now cirros-0.3.3-x86_64-disk.img is available in /images in 192.168.1.10 Now when I am doing glance image-create --name "cirros-0.3.3-x86_64_nfs" --file /images/cirros-0.3.3-x86_64-disk.img --disk-format qcow2 --container-format bare --is-public True --progress at the terminal of controller
It is giving error
<html> <head> <title>410 Gone</title> </head> <body>
410 Gone
Error in store configuration. Adding images to store is disabled.</body> </html> (HTTP N/A)
So how to configure the glance for my above situation ??
Here is my glance-api.conf
[DEFAULT] notification_driver = noop verbose = True
[database] connection = mysql://glance:myglance@controller/glance
[keystone_authtoken] auth_uri = http://controller:5000/v2.0 identity_uri = http://controller:35357 admin_tenant_name = service admin_user = glance admin_password = glance96
[paste_deploy] flavor = keystone
[store_type_location_strategy]
[profiler] [task] [glance_store] default_store = file filesystem_store_datadir = /images/
Is that configuration Okay??
Here is the log file /var/log/glance/api.log
2015-12-22 08:35:18.644 27277 ERROR glance.api.v1.upload_utils [aad9aa3e-273e-406d-b708-610194d445fb 721760a70dd64d00b3c4bb341d004a15 408336c84c1347eea93b826eca46c82f - - -] Error in store configuration. Adding images to store is disabled. 2015-12-22 08:35:18.644 27277 TRACE glance.api.v1.upload_utils Traceback (most recent call last): 2015-12-22 08:35:18.644 27277 TRACE glance.api.v1.upload_utils File "/usr/lib/python2.7/site-packages/glance/api/v1/upload_utils.py", line 113, in upload_data_to_store 2015-12-22 08:35:18.644 27277 TRACE glance.api.v1.upload_utils context=req.context) 2015-12-22 08:35:18.644 27277 TRACE glance.api.v1.upload_utils File "/usr/lib/python2.7/site-packages/glance_store/backend.py", line 331, in store_add_to_backend 2015-12-22 08:35:18.644 27277 TRACE glance.api.v1.upload_utils context=context) 2015-12-22 08:35:18.644 27277 TRACE glance.api.v1.upload_utils File "/usr/lib/python2.7/site-packages/glance_store/driver.py", line 128, in add_disabled 2015-12-22 08:35:18.644 27277 TRACE glance.api.v1.upload_utils raise exceptions.StoreAddDisabled 2015-12-22 08:35:18.644 27277 TRACE glance.api.v1.upload_utils StoreAddDisabled: None 2015-12-22 08:35:18.644 27277 TRACE glance.api.v1.upload_utils 2015-12-22 08:35:18.869 27277 INFO glance.wsgi.server [aad9aa3e-273e-406d-b708-610194d445fb 721760a70dd64d00b3c4bb341d004a15 408336c84c1347eea93b826eca46c82f - - -] 135.249.35.68 - - [22/Dec/2015 08:35:18] "POST /v1/images HTTP/1.1" 410 386 0.929409
is the glance service running ? can't you see anything in the glance logs ?
yes it is running ... I restarted glance api and regitry services both.. after modifying the glance-api.conf file
The log from /var/log/glance/api.log .. but donno what is the solution for the above :-(
Did you try to write something to /images as a normal user ? Maybe glance doesn't have permissions to /images.
This is the URL which I tried https://ask.openstack.org/en/question/81632/glance-error-in-store-configuration-adding-images-to-store-is-disabled/ (https://ask.openstack.org/en/question...). I created a user in 192.168.1.20 glance and changed the owner ship of /images folder from root to glance . still same error while image create command