Improve lazy loading mechanism for multiple stores

Bug #1886374 reported by Abhishek Kekane on 2020-07-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
High
Abhishek Kekane
Train
Undecided
Abhishek Kekane
Ussuri
Undecided
Abhishek Kekane

Bug Description

Glance has a facility lazy loading for legacy images which will be called on get/list api calls to add store information in image's location metadata based on location URL of image. Even if admin decides to change the store names in glance-api.conf same will also be updated in location metadata for all images related to that particular store. Current implementation of legacy image performs this operation on each get/list call as location metadata is not getting updated in database or it doesn't handle to perform store name check in glance-api.conf

Proposed fix for improvements:
1. Save updated location metadata information in database permanently
2. Add logic to perform lazy loading only if store information is not present in location metadata or store present in location metadata is not defined in glance's enbaled_backends configuration option.

Changed in glance:
assignee: nobody → Abhishek Kekane (abhishek-kekane)
importance: Undecided → High
no longer affects: glance/victoria

Fix proposed to branch: master
Review: https://review.opendev.org/739423

Changed in glance:
status: New → In Progress

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

commit ab0e5268a9c2614572659d763b3c0b6fc36dd0cf
Author: Abhishek Kekane <email address hidden>
Date: Mon Jul 6 07:49:31 2020 +0000

    Improve lazy loading mechanism for multiple stores

    Glance has a facility lazy loading for legacy images which will be called
    on get/list api calls to add store information in image's location metadata
    based on location URL of image. Even if admin decides to change the store
    names in glance-api.conf same will also be updated in location metadata
    for all images related to that particular store. Current implementation of
    legacy image performs this operation on each get/list call as location metadata
    is not getting updated in database or it doesn't handle to perform store name
    check in glance-api.conf.

    Improvements done:
    1. Save updated location metadata information in database permenantly
    2. Add logic to perform lazy loading only if store information is not present
    in location metadata or store present in location metadata is not defined in
    glance's enbaled_backends configuration option.

    Change-Id: I789fa7adfb459e7861c90a51f418a635c0c22244
    Closes-Bug: #1886374

Changed in glance:
status: In Progress → Fix Released

Reviewed: https://review.opendev.org/740997
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=9a104acbae328788451442f71aefbc5c20a98f3c
Submitter: Zuul
Branch: stable/ussuri

commit 9a104acbae328788451442f71aefbc5c20a98f3c
Author: Abhishek Kekane <email address hidden>
Date: Mon Jul 6 07:49:31 2020 +0000

    Improve lazy loading mechanism for multiple stores

    Glance has a facility lazy loading for legacy images which will be called
    on get/list api calls to add store information in image's location metadata
    based on location URL of image. Even if admin decides to change the store
    names in glance-api.conf same will also be updated in location metadata
    for all images related to that particular store. Current implementation of
    legacy image performs this operation on each get/list call as location metadata
    is not getting updated in database or it doesn't handle to perform store name
    check in glance-api.conf.

    Improvements done:
    1. Save updated location metadata information in database permenantly
    2. Add logic to perform lazy loading only if store information is not present
    in location metadata or store present in location metadata is not defined in
    glance's enbaled_backends configuration option.

    Change-Id: I789fa7adfb459e7861c90a51f418a635c0c22244
    Closes-Bug: #1886374
    (cherry picked from commit ab0e5268a9c2614572659d763b3c0b6fc36dd0cf)

Reviewed: https://review.opendev.org/741086
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=baf6b5ebf05ce7a2fb012f4a90cf34c61059d97a
Submitter: Zuul
Branch: stable/train

commit baf6b5ebf05ce7a2fb012f4a90cf34c61059d97a
Author: Abhishek Kekane <email address hidden>
Date: Mon Jul 6 07:49:31 2020 +0000

    Improve lazy loading mechanism for multiple stores

    Glance has a facility lazy loading for legacy images which will be called
    on get/list api calls to add store information in image's location metadata
    based on location URL of image. Even if admin decides to change the store
    names in glance-api.conf same will also be updated in location metadata
    for all images related to that particular store. Current implementation of
    legacy image performs this operation on each get/list call as location metadata
    is not getting updated in database or it doesn't handle to perform store name
    check in glance-api.conf.

    Improvements done:
    1. Save updated location metadata information in database permenantly
    2. Add logic to perform lazy loading only if store information is not present
    in location metadata or store present in location metadata is not defined in
    glance's enbaled_backends configuration option.

    Change-Id: I789fa7adfb459e7861c90a51f418a635c0c22244
    Closes-Bug: #1886374
    (cherry picked from commit ab0e5268a9c2614572659d763b3c0b6fc36dd0cf)
    (cherry picked from commit 9a104acbae328788451442f71aefbc5c20a98f3c)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers