← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2065087] Re: glance-cache-prefetcher is not working as threadpool is not set


Reviewed:  https://review.opendev.org/c/openstack/glance/+/918473
Committed: https://opendev.org/openstack/glance/commit/32ee57ccdeea90a86bce1e5e33d10fab115ed2d3
Submitter: "Zuul (22348)"
Branch:    master

commit 32ee57ccdeea90a86bce1e5e33d10fab115ed2d3
Author: Abhishek Kekane <akekane@xxxxxxxxxx>
Date:   Tue May 7 18:05:24 2024 +0000

    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

** 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.

  glance-cache-prefetcher is not working as threadpool is not set

Status in Glance:
  Fix Released

Bug description:
  glance-cache-prefetcher is broken as it fails to set threadpool model
  which is essential to run this command line utility.

  CRITICAL glance [None req-e769a210-dc42-4bbf-a953-658a85ff251d None None] Unhandled error: AssertionError
  ERROR glance Traceback (most recent call last):
  ERROR glance   File "/opt/stack/data/venv/bin/glance-cache-prefetcher", line 10, in <module>
  ERROR glance     sys.exit(main())
  ERROR glance   File "/opt/stack/glance/glance/cmd/cache_prefetcher.py", line 63, in main
  ERROR glance     app.run()
  ERROR glance   File "/usr/lib/python3.10/contextlib.py", line 79, in inner
  ERROR glance     return func(*args, **kwds)
  ERROR glance   File "/opt/stack/glance/glance/image_cache/prefetcher.py", line 85, in run
  ERROR glance     pool = api_common.get_thread_pool('prefetcher', size=num_images)
  ERROR glance   File "/opt/stack/glance/glance/api/common.py", line 230, in get_thread_pool
  ERROR glance     def _get_thread_pool():
  ERROR glance   File "/opt/stack/glance/glance/api/common.py", line 201, in memoizer_wrapper
  ERROR glance     return memoizer(lock_name)
  ERROR glance   File "/opt/stack/data/venv/lib/python3.10/site-packages/oslo_concurrency/lockutils.py", line 412, in inner
  ERROR glance     return f(*args, **kwargs)
  ERROR glance   File "/opt/stack/glance/glance/api/common.py", line 197, in memoizer
  ERROR glance     _CACHED_THREAD_POOL[lock_name] = func()
  ERROR glance   File "/opt/stack/glance/glance/api/common.py", line 231, in _get_thread_pool
  ERROR glance     threadpool_cls = glance.async_.get_threadpool_model()
  ERROR glance   File "/opt/stack/glance/glance/async_/__init__.py", line 201, in get_threadpool_model
  ERROR glance     assert _THREADPOOL_MODEL
  ERROR glance AssertionError

To manage notifications about this bug go to: