Public bug reported:

Newly added multiple import fails if user passes "all_stores" as "true" in the 
request.
The reason is if all_stores is specified then we are getting stores using 
CONF.enabled_backends and unfortunately we are injecting reserved stores 
'os_glance_staging_store' and 'os_glance_tasks_store' runtime. As a result 
import job tries to import the image in the 'os_glance_staging_store' store as 
well where it fails as that image is already staged in this staging store.

Steps to reproduce:

1. Create image using
   glance --debug image-create-via-import --disk-format qcow2 
--container-format bare --name multi-copy-test-13
2. Stage the data for import using
   glance image-stage <image-id> --file <file-name>
3. import image in multiple stores by setting all_stores as true
   curl -g -i -X POST http://192.168.0.27:9292/v2/images/<img-id>/import 
"User-Agent: python-glanceclient" -H "Content-Type: application/json" -H 
"X-Auth-Token: <token>" -d '{"method": {"name": "glance-direct"}, "all_stores": 
"true"}'


Expected result:
Image should be imported in all stores configured using enabled_backends config 
option

Actual result:
Image fails to import and data remains in staging area

Possible solution:
After population stores using CONF.enabled_backends, remove reserved stores 
from those stores.

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

** Changed in: glance
   Importance: Undecided => High

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

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

Title:
  Multiple import fails if all-stores 'True' is passed

Status in Glance:
  New

Bug description:
  Newly added multiple import fails if user passes "all_stores" as "true" in 
the request.
  The reason is if all_stores is specified then we are getting stores using 
CONF.enabled_backends and unfortunately we are injecting reserved stores 
'os_glance_staging_store' and 'os_glance_tasks_store' runtime. As a result 
import job tries to import the image in the 'os_glance_staging_store' store as 
well where it fails as that image is already staged in this staging store.

  Steps to reproduce:

  1. Create image using
     glance --debug image-create-via-import --disk-format qcow2 
--container-format bare --name multi-copy-test-13
  2. Stage the data for import using
     glance image-stage <image-id> --file <file-name>
  3. import image in multiple stores by setting all_stores as true
     curl -g -i -X POST http://192.168.0.27:9292/v2/images/<img-id>/import 
"User-Agent: python-glanceclient" -H "Content-Type: application/json" -H 
"X-Auth-Token: <token>" -d '{"method": {"name": "glance-direct"}, "all_stores": 
"true"}'

  
  Expected result:
  Image should be imported in all stores configured using enabled_backends 
config option

  Actual result:
  Image fails to import and data remains in staging area

  Possible solution:
  After population stores using CONF.enabled_backends, remove reserved stores 
from those stores.

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to