Comment 2 for bug 1939307

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.opendev.org/c/openstack/glance/+/803937
Committed: https://opendev.org/openstack/glance/commit/9b385f7b671fd9994d416949ebd10c424d9fc072
Submitter: "Zuul (22348)"
Branch: master

commit 9b385f7b671fd9994d416949ebd10c424d9fc072
Author: Abhishek Kekane <email address hidden>
Date: Mon Aug 9 07:00:54 2021 +0000

    [uwsgi] Add missing pefetch periodic job

    Glance was not supporting uwsgi deployment when we added periodic job
    to prefetch images into cache. Later in ussuri uwsgi support was added
    but we missed to implement periodic job to pre-cache the image.

    This patch add this support for glance + uwsgi. For WSGI, we run the
    prefetcher with an external lock, which makes sure that multiple API
    workers will not attempt to cache an image at the same time. In this
    case, if multiple workers attempt to run at the same time, only one
    will grab the lock and do the work. When completed, the other worker
    will grab the lock and either find all the work completed, or complete
    new work that has been queued since the first one started.

    Closes-Bug: #1939307
    Co-Authored-By: Dan Smith <email address hidden>
    Change-Id: I2abd1e60f414fbd68ce84e0b280f8b3e4e791a82