Fix broken glance-cache-prefetcher utility

glance-cache-preftecher utility was failing because it was not
setting global threadpool model while initilizing the tool.

Closes-Bug: #2065087
Change-Id: I0c09dd7c0d81178ebf2aa5efd19c54866fc8791b
(cherry picked from commit 32ee57ccde)
This commit is contained in:
Abhishek Kekane 2024-05-07 18:05:24 +00:00 committed by Brian Rosmaita
parent f6a553aa5a
commit 99540a990f

View File

@ -36,6 +36,7 @@ if os.path.exists(os.path.join(possible_topdir, 'glance', '__init__.py')):
import glance_store
from oslo_log import log as logging
import glance.async_
from glance.common import config
from glance.image_cache import prefetcher
@ -49,6 +50,7 @@ def main():
config.parse_cache_args()
logging.setup(CONF, 'glance')
CONF.import_opt('enabled_backends', 'glance.common.wsgi')
glance.async_.set_threadpool_model('eventlet')
if CONF.enabled_backends:
glance_store.register_store_opts(CONF)