oslo.cache is noisy on startup if memcache is missing

Bug #1940279 reported by Stephen Finucane
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.cache
New
Undecided
Unassigned

Bug Description

When running unit tests in nova, we see the following error message quite regularly:

  2021-08-17 11:54:58.368 27961 ERROR stevedore.extension [req-ac3ac729-e3f6-4977-95ac-f3a2b8bb7457 fake_user 6a6a9c9eee154e9cb8cec487b98d36ab - - -] Could not load 'oslo_cache.memcache_pool': No module named 'memcache': ModuleNotFoundError: No module named 'memcache'
  2021-08-17 11:54:58.375 27959 ERROR stevedore.extension [req-3c345bf7-7af2-43b7-aa63-fe6274991b2e fake_user 6a6a9c9eee154e9cb8cec487b98d36ab - - -] Could not load 'oslo_cache.memcache_pool': No module named 'memcache': ModuleNotFoundError: No module named 'memcache'
  2021-08-17 11:54:58.393 27962 ERROR stevedore.extension [req-8f167a6a-ca66-4386-9dad-78ae4e63173a fake_user 6a6a9c9eee154e9cb8cec487b98d36ab - - -] Could not load 'oslo_cache.memcache_pool': No module named 'memcache': ModuleNotFoundError: No module named 'memcache'
  2021-08-17 11:54:58.545 27960 ERROR stevedore.extension [req-64210d11-2585-477c-8dac-07bd12ba72c2 fake_user 6a6a9c9eee154e9cb8cec487b98d36ab - - -] Could not load 'oslo_cache.memcache_pool': No module named 'memcache': ModuleNotFoundError: No module named 'memcache'

By stopping the process at the right time, we see the following exception:

    File "/opt/stack/nova/tests/unit/test_availability_zones.py", line 34, in <module>
      class AvailabilityZoneTestCases(test.TestCase):
    File "/opt/stack/nova/tests/unit/test_availability_zones.py", line 254, in AvailabilityZoneTestCases
      @mock.patch.object(az._get_cache(), 'get')
    File "/opt/stack/nova/availability_zones.py", line 36, in _get_cache
      MC = cache_utils.get_client(expiration_time=AZ_CACHE_SECONDS)
    File "/opt/stack/nova/cache_utils.py", line 58, in get_client
      backend='oslo_cache.dict'))
    File "/opt/stack/nova/cache_utils.py", line 96, in _get_custom_cache_region
      region.configure(backend, **region_params)
    File "/opt/stack/.tox/py36/lib/python3.6/site-packages/dogpile/cache/region.py", line 480, in configure
      backend_cls = _backend_loader.load(backend)
    File "/opt/stack/.tox/py36/lib/python3.6/site-packages/dogpile/util/langhelpers.py", line 47, in load
      self._mgr = stevedore.ExtensionManager(self.group)
    File "/opt/stack/.tox/py36/lib/python3.6/site-packages/stevedore/extension.py", line 136, in __init__
      verify_requirements)
    File "/opt/stack/.tox/py36/lib/python3.6/site-packages/stevedore/extension.py", line 243, in _load_plugins
      exc_info=LOG.isEnabledFor(logging.DEBUG))
  Message: 'Could not load %r: %s'
  Arguments: ('oslo_cache.memcache_pool', ModuleNotFoundError("No module named 'memcache'",))

I've yet to figure out how to silence these errors or whether it's actually nova that needs to change something, but I suspect we might need configure stevedore slightly differently.

Leaving this here so I remember to investigate in the future.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.