Reviewed: https://review.opendev.org/677666 Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=3fda53c520540cb634234564d0b06193b2d2dcde Submitter: Zuul Branch: master
commit 3fda53c520540cb634234564d0b06193b2d2dcde Author: Abhishek Kekane <[email protected]> Date: Wed Aug 21 07:54:05 2019 +0000 MultiStore: Lazy update fails if image is not owned by owner Lazy updating store information in location metadata fails if image is not owned by the user. The reason is saving this information to image object returns Forbidden error as the user is not allowed to change the image information. Actually after updating the location information there is no need to explicitly call save function because when location information is updated using image.locations object it is updated to database at the same time. To fix this issue, remved the image_repo.save call, so that Lazy update should be allowed to index as well as show call for all the users. Change-Id: I92c85647ea4eea7069f8124334402f9127bf653c Closes-Bug: #1840885 ** 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/1840885 Title: MultiStore: Lazy update fails if image is not owned by owner Status in Glance: Fix Released Bug description: Recently merged patch [1] adds a capacity to image to update the store location in the location metadata. Lazy update of metadata fails on image-list call if one of the image listed is not owned by the user and throws NotFound error. Environment details: 1. Devstack: latest version 2. glance_store v1.0.0 Steps to reproduce: 1. Enable multiple stores in glance-api.conf (Add below params under respective sections) [Default] enabled_backends = fast:file,cheap:file [glance_store] default_backend = fast [fast] filesystem_store_datadir = /opt/stack/data/glance/fast/ [cheap] filesystem_store_datadir = /opt/stack/data/glance/cheap/ 2. restart glance-api service 3. source using ~/devstack localrc demo demo 4. Run glance image-list command Expected result: All images should be shown Actual Result: HTTP 400 Bad Request: No image found with ID <image-id> [1] https://review.opendev.org/#/c/660645/16 To manage notifications about this bug go to: https://bugs.launchpad.net/glance/+bug/1840885/+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

