← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1871588] Re: copy-image, multiple image imports dosen't work as expected if all_stores_must_succeed passed as string

 

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

commit 55b7c86ecf349ee02a64dd77ff351c131f97276c
Author: Abhishek Kekane <akekane@xxxxxxxxxx>
Date:   Wed Apr 8 09:47:44 2020 +0000

    Fix multiple image imports if boolean input passed as string
    
    If user passes 'all_stores_must_succeed' as 'false' in copy-image, multiple
    image imports request body then it does not work as expected. Expected is
    to skip the failure store and continue copying/importing image to other
    stores but instead it stops execution of task and revert it and deletes
    the image data copied/imported to previois stores.
    
    Raised 400 BadRequest if 'all_stores_must_succeed' and 'all_stores' are
    other thatn than boolean values.
    
    NOTE: Documentation clearly suggest that we expect boolean values for
    'all_stores_must_succeed' and 'all_stores'
    
    Closes-Bug: #1871588
    Change-Id: I5118489284fea007f8f29663581221b07a575cf3


** 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/1871588

Title:
  copy-image, multiple image imports dosen't work as expected if
  all_stores_must_succeed passed as string

Status in Glance:
  Fix Released

Bug description:
  If user passes 'all_stores_must_succeed' as 'false' in copy-image, multiple image imports request body then it does not work as expected.
  Expected is to skip the failure store and continue copying/importing image to other stores but instead it stops execution of task and revert it and deletes the image data copied/imported to previous stores.

  How to reproduce:

  1. Ensure multipe stores are enabled in your environment and multiple stores are configured
  2. Run below commands to import image in multiple stores
     glance --debug image-create-via-import --container-format ami --disk-format ami --name import_scenario --file gentoo_root.img --all-stores True --allow-failure True
     (internal curl command to API - curl -g -i -X POST http://192.168.100.13:9292/v2/images/04f891c8-1a20-4c3d-a270-59b1123584cb/import -H "Content-Type: application/json" -H "User-Agent: python-glanceclient" -H "X-Auth-Token: {SHA256}b83a45c9d14131f4d461af948a9c2bf961a035762c3af6e9cc7432bb5e33b2bb" -d '{"method": {"name": "glance-direct"}, "stores": ["ceph", "cheap", "slow", "reliable", "common"], "all_stores_must_succeed": "false"}')

  Assume failure occures while importing image to "slow" store

  Expected result:
     Image should be uploaded to all other stores except "slow" store

  Actual result:
     Image remains in 'importing' state and data imported to previous stores get deleted while reverting the import tasks.

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


References