← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1863879] Re: Multiple import fails if all-stores 'True' is passed

 

Reviewed:  https://review.opendev.org/708629
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=d7de7ccbd68a77e07cde0e3d8bb1a0874c0be903
Submitter: Zuul
Branch:    master

commit d7de7ccbd68a77e07cde0e3d8bb1a0874c0be903
Author: Abhishek Kekane <akekane@xxxxxxxxxx>
Date:   Wed Feb 19 12:03:58 2020 +0000

    Multiple import fails if "all_stores" specified as "true"
    
    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.
    
    Made a provision to exclude available reserved stores if "all_stores"
    is specified.
    
    Change-Id: If2616c275a969cdad5649e2cb0851275e5d0c7d2
    Closes-Bug: #1863879


** Changed in: glance
       Status: In Progress => Fix Released

-- 
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:
  Fix Released

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


References