← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2100546] [NEW] Could not find backend 'django.core.cache.backends.memcached.MemcachedCache' - openstack-dashboard 4:24.0.0

 

Public bug reported:


Following these instructions: https://docs.openstack.org/horizon/2024.1/install/install-ubuntu.html 

CACHES = {
    'default': {
         'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
         'LOCATION': 'controller:11211',
    }
}


dpkg -l | grep openstack
ii  openstack-dashboard                    4:24.0.0-0ubuntu1.2~cloud0                           all          Django web interface for OpenStack


Started with this error:
Could not find backend 'django.core.cache.backends.memcached.MemcachedCache': Module "django.core.cache.backends.memcached" does not define a "MemcachedCache" attribute/class


InvalidCacheBackendError at /auth/login/
Could not find backend 'django.core.cache.backends.memcached.MemcacheCache': Module "django.core.cache.backends.memcached" does not define a "MemcacheCache" attribute/class
Request Method:	GET
Request URL:	http://localhost:9098/horizon/auth/login/?next=/horizon/
Django Version:	4.2.11
Exception Type:	InvalidCacheBackendError
Exception Value:	
Could not find backend 'django.core.cache.backends.memcached.MemcacheCache': Module "django.core.cache.backends.memcached" does not define a "MemcacheCache" attribute/class
Exception Location:	/usr/lib/python3/dist-packages/django/core/cache/__init__.py, line 49, in create_connection
Python Executable:	/usr/bin/python3
Python Version:	3.10.12
Python Path:	
['/usr/lib/python3/dist-packages',
 '/usr/lib/python310.zip',
 '/usr/lib/python3.10',
 '/usr/lib/python3.10/lib-dynload',
 '/usr/local/lib/python3.10/dist-packages',
 '/usr/lib/python3/dist-packages',
 '/usr/lib/python3/dist-packages/openstack_dashboard']
Server time:	Thu, 27 Feb 2025 16:29:47 +0000

note python and django version from command line. Different from above. 
Running python on cmd line: 
python3
Python 3.10.12 (main, Feb  4 2025, 14:57:36) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> print(django.get_version())
4.2.11

Then changed  local_settings.py to PyMemcacheCache


Getting this error: 
OfflineGenerationError at /auth/login/
You have offline compression enabled but key "xxx" is missing from offline manifest. You may need to run "python manage.py compress". Here is the original content:

this is my /etc/openstack-dashboard/local_settings.py

CACHES = {
    'default': {
         'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
         'LOCATION': 'controller:11211',
    }
}
After following these instructions:  OpenStack 2024.1 Caracal for Ubuntu 22.04 LTS: add-apt-repository cloud-archive:caracal

Saw this was fixed in earlier version of Horizon. So not sure what to do
for this one?

** Affects: horizon
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/2100546

Title:
  Could not find backend
  'django.core.cache.backends.memcached.MemcachedCache'   - openstack-
  dashboard                    4:24.0.0

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  
  Following these instructions: https://docs.openstack.org/horizon/2024.1/install/install-ubuntu.html 

  CACHES = {
      'default': {
           'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
           'LOCATION': 'controller:11211',
      }
  }


  dpkg -l | grep openstack
  ii  openstack-dashboard                    4:24.0.0-0ubuntu1.2~cloud0                           all          Django web interface for OpenStack

  
  Started with this error:
  Could not find backend 'django.core.cache.backends.memcached.MemcachedCache': Module "django.core.cache.backends.memcached" does not define a "MemcachedCache" attribute/class

  
  InvalidCacheBackendError at /auth/login/
  Could not find backend 'django.core.cache.backends.memcached.MemcacheCache': Module "django.core.cache.backends.memcached" does not define a "MemcacheCache" attribute/class
  Request Method:	GET
  Request URL:	http://localhost:9098/horizon/auth/login/?next=/horizon/
  Django Version:	4.2.11
  Exception Type:	InvalidCacheBackendError
  Exception Value:	
  Could not find backend 'django.core.cache.backends.memcached.MemcacheCache': Module "django.core.cache.backends.memcached" does not define a "MemcacheCache" attribute/class
  Exception Location:	/usr/lib/python3/dist-packages/django/core/cache/__init__.py, line 49, in create_connection
  Python Executable:	/usr/bin/python3
  Python Version:	3.10.12
  Python Path:	
  ['/usr/lib/python3/dist-packages',
   '/usr/lib/python310.zip',
   '/usr/lib/python3.10',
   '/usr/lib/python3.10/lib-dynload',
   '/usr/local/lib/python3.10/dist-packages',
   '/usr/lib/python3/dist-packages',
   '/usr/lib/python3/dist-packages/openstack_dashboard']
  Server time:	Thu, 27 Feb 2025 16:29:47 +0000

  note python and django version from command line. Different from above. 
  Running python on cmd line: 
  python3
  Python 3.10.12 (main, Feb  4 2025, 14:57:36) [GCC 11.4.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import django
  >>> print(django.get_version())
  4.2.11

  Then changed  local_settings.py to PyMemcacheCache

  
  Getting this error: 
  OfflineGenerationError at /auth/login/
  You have offline compression enabled but key "xxx" is missing from offline manifest. You may need to run "python manage.py compress". Here is the original content:

  this is my /etc/openstack-dashboard/local_settings.py

  CACHES = {
      'default': {
           'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
           'LOCATION': 'controller:11211',
      }
  }
  After following these instructions:  OpenStack 2024.1 Caracal for Ubuntu 22.04 LTS: add-apt-repository cloud-archive:caracal

  Saw this was fixed in earlier version of Horizon. So not sure what to
  do for this one?

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/2100546/+subscriptions



Follow ups