Image is not added when filesystem_store_datadirs specified in glance configuration

Bug #1380547 reported by Abhishek Kekane
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Glance
Invalid
Undecided
Abhishek Kekane

Bug Description

If user specifies 'filesystem_store_datadirs' option in the glance api configuration, he is not able to add the image to the specified location as following response is returned to the user.

<html>
 <head>
  <title>410 Gone</title>
 </head>
 <body>
  <h1>410 Gone</h1>
  Error in store configuration. Adding images to store is disabled.<br /><br />

 </body>
</html> (HTTP N/A)

Steps to reproduce:

1. Edit glance-api.conf file to add 'filesystem_store_datadirs' parameter.
   filesystem_store_datadirs = /opt/stack/data/glance/images/:1

   Note: Disable 'filesystem_store_datadir' option

2. restart glance-api service

3. create image
   glance image-create --file /etc/passwd --name passwd --container-format bare --disk-format raw

Tags: backend ntt
Changed in glance:
assignee: nobody → Abhishek Kekane (abhishek-kekane)
Revision history for this message
Abhishek Kekane (abhishek-kekane) wrote :

In case if filesystem_store_datadir is specified with any other path than /opt/stack/data/glacne/images and disabled filesystem_store_datadirs option then also the filesystem_store_datadir refers to /opt/stack/data/glance/images

E.g in glance-api.conf if
filesystem_store_datadir = /opt/stack/data/glacne/images1

then also new image gets added at /opt/stack/data/glacne/images location.

Erno Kuvaja (jokke)
tags: added: backend
Revision history for this message
Abhishek Kekane (abhishek-kekane) wrote :

Hi,

just found that in glance/api.conf filesystem_store_datadir parameter is specified twice in Default as well as glance_store section. If you comment filesystem_store_datadir from both the location then it's working correctly.

IMO the fix is remove filesystem_store_datadir and filesystem_store_datadirs from 'DEFAULT' section and add it under 'glance_store' section.

Revision history for this message
Abhishek Kekane (abhishek-kekane) wrote :

The issue of moving deprecated filesystem options from DEFAULT sections to glance_store section in glance-api.conf, is addressed by this bug https://bugs.launchpad.net/bugs/1380689

Marking this bug as invalid.

Changed in glance:
status: New → Invalid
Revision history for this message
Zhi Yan Liu (lzy-dev) wrote :

As we designed, glance (even all services) should be able to load options from deprecated place instead of failure. This report involved a backward-compatibility issue of glance or/and glance_store, IMO. Need more investigation.

Changed in glance:
status: Invalid → New
Revision history for this message
Zhi Yan Liu (lzy-dev) wrote :

With abhishekk's clarification, now I see what really happened behind this report. Agreed to mark this as invalid. Thanks for the clarification abhishekk.

Changed in glance:
status: New → Invalid
Revision history for this message
Dane Fichter (dane-fichter) wrote :

I'm getting this error after cloning a fresh devstack in Ubuntu 14.04

Revision history for this message
Alex O'Rourke (alex-orourke) wrote :

I am seeing this error as well in stable/kilo on a fresh Ubuntu 14.04 install as well. Was this fixed?

Revision history for this message
greatbsky (greatbsky) wrote :

I am seeing this error as well in stable/kilo on a centos7 install as well.
and i solved it, by uncomment:

stores=glance.store.filesystem.Store,glance.store.http.Store

Revision history for this message
Sachin (sacpatil) wrote :

I tried un-commenting

stores=glance.store.filesystem.Store,glance.store.http.Store

and restart glance-api but not success.

Also I un-commented

filesystem_store_datadirs=/var/lib/glance/images/:1

So how exactly to fix this issue?

Revision history for this message
Artem Savinov (asavinov) wrote :

centos 7, liberty- also i solved it by add
[glance_store]
store = file

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.