← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1372888] [NEW] g-api raise 500 error if filesystem_store_datadirs and filesystem_store_datadir both specified

 

Public bug reported:

g-api raise 500 error if filesystem_store_datadirs and
filesystem_store_datadir both specified

If both filesystem_store_datadirs and filesystem_store_datadir
parameters specified in glance-api.conf file then while creating new
image 500 internal server error will be raised. Ideally it should raise
'BadStoreConfiguration' exception and glance-api service should not be
started.

Stack trace on the console:

2014-09-23 03:15:24.407 7594 ERROR glance.api.v1.upload_utils [f351b844-8b1e-429c-8943-a79b331311be 41d56c1d7e134fdb8a1dcfe4ea3c82de 73078aaf41fb47b5bb0cfd4e9fdc79fb - - -] Failed to upload image 288f7386-bddf-4b2b-a97f-49d2814f7b99
2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils Traceback (most recent call last):
2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/api/v1/upload_utils.py", line 106, in upload_data_to_store
2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils     store)
2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils   File "/usr/local/lib/python2.7/dist-packages/glance_store/backend.py", line 342, in store_add_to_backend
2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils     (location, size, checksum, metadata) = store.add(image_id, data, size)
2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils   File "/usr/local/lib/python2.7/dist-packages/glance_store/driver.py", line 149, in add_disabled
2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils     raise exceptions.StoreAddDisabled
2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils StoreAddDisabled: None

Steps to reproduce:
1. edit glance-api.conf file and specify values for both filesystem_store_datadirs and filesystem_store_datadir options
2. Restart the glance-api service
3. Hit create-image api/upload image using horizon

** Affects: glance
     Importance: Undecided
     Assignee: Abhishek Kekane (abhishek-kekane)
         Status: New


** Tags: ntt

** Changed in: glance
     Assignee: (unassigned) => Abhishek Kekane (abhishek-kekane)

** Description changed:

  g-api raise 500 error if filesystem_store_datadirs and
  filesystem_store_datadir both specified
  
  If both filesystem_store_datadirs and filesystem_store_datadir
  parameters specified in glance-api.conf file then while creating new
  image 500 internal server error will be raised. Ideally it should raise
  'BadStoreConfiguration' exception and glance-api service should not be
  started.
  
  Stack trace on the console:
  
  2014-09-23 03:15:24.407 7594 ERROR glance.api.v1.upload_utils [f351b844-8b1e-429c-8943-a79b331311be 41d56c1d7e134fdb8a1dcfe4ea3c82de 73078aaf41fb47b5bb0cfd4e9fdc79fb - - -] Failed to upload image 288f7386-bddf-4b2b-a97f-49d2814f7b99
  2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils Traceback (most recent call last):
  2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/api/v1/upload_utils.py", line 106, in upload_data_to_store
  2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils     store)
  2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils   File "/usr/local/lib/python2.7/dist-packages/glance_store/backend.py", line 342, in store_add_to_backend
  2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils     (location, size, checksum, metadata) = store.add(image_id, data, size)
  2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils   File "/usr/local/lib/python2.7/dist-packages/glance_store/driver.py", line 149, in add_disabled
  2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils     raise exceptions.StoreAddDisabled
  2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils StoreAddDisabled: None
  
  Steps to reproduce:
  1. edit glance-api.conf file and specify values for both filesystem_store_datadirs and filesystem_store_datadir options
  2. Restart the glance-api service
- 3. Hit create-image api
+ 3. Hit create-image api/upload image using horizon

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1372888

Title:
  g-api raise 500 error if filesystem_store_datadirs and
  filesystem_store_datadir both specified

Status in OpenStack Image Registry and Delivery Service (Glance):
  New

Bug description:
  g-api raise 500 error if filesystem_store_datadirs and
  filesystem_store_datadir both specified

  If both filesystem_store_datadirs and filesystem_store_datadir
  parameters specified in glance-api.conf file then while creating new
  image 500 internal server error will be raised. Ideally it should
  raise 'BadStoreConfiguration' exception and glance-api service should
  not be started.

  Stack trace on the console:

  2014-09-23 03:15:24.407 7594 ERROR glance.api.v1.upload_utils [f351b844-8b1e-429c-8943-a79b331311be 41d56c1d7e134fdb8a1dcfe4ea3c82de 73078aaf41fb47b5bb0cfd4e9fdc79fb - - -] Failed to upload image 288f7386-bddf-4b2b-a97f-49d2814f7b99
  2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils Traceback (most recent call last):
  2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/api/v1/upload_utils.py", line 106, in upload_data_to_store
  2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils     store)
  2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils   File "/usr/local/lib/python2.7/dist-packages/glance_store/backend.py", line 342, in store_add_to_backend
  2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils     (location, size, checksum, metadata) = store.add(image_id, data, size)
  2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils   File "/usr/local/lib/python2.7/dist-packages/glance_store/driver.py", line 149, in add_disabled
  2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils     raise exceptions.StoreAddDisabled
  2014-09-23 03:15:24.407 7594 TRACE glance.api.v1.upload_utils StoreAddDisabled: None

  Steps to reproduce:
  1. edit glance-api.conf file and specify values for both filesystem_store_datadirs and filesystem_store_datadir options
  2. Restart the glance-api service
  3. Hit create-image api/upload image using horizon

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1372888/+subscriptions


Follow ups

References