[Bug 2039225] Re: django.core.cache.backends.memcached.MemcachedCache backend is removed

OpenStack Infra 2039225 at bugs.launchpad.net
Tue Nov 21 12:24:54 UTC 2023


Reviewed:  https://review.opendev.org/c/openstack/charm-openstack-dashboard/+/898246
Committed: https://opendev.org/openstack/charm-openstack-dashboard/commit/16c5a026419e5c23ab4e7777cec8deb15c25ee6f
Submitter: "Zuul (22348)"
Branch:    master

commit 16c5a026419e5c23ab4e7777cec8deb15c25ee6f
Author: Corey Bryant <corey.bryant at canonical.com>
Date:   Fri Oct 13 14:57:46 2023 -0400

    Add local_settings.py template for Bobcat
    
    This fixes issues found in testing with Django 4 in mantic.
    
    ugettext_lazy was deprecated in Django 3.0 and removed in
    Django 4.0. Switch to gettext_lazy.
    
    Switch to PyMemcacheCache backend as the Django MemcachedCache
    backend was removed in Django 4.1 in favor of the PyMemcacheCache
    or PyLibMCCache backend. This depends on a new openstack-dashboard
    package version that will be provided in an SRU for bug #2039225.
    
    Closes-Bug: #2039226
    Closes-Bug: #2039225
    Change-Id: Ia8e4f6f5f50d58268e4c6fa80c9f9c65a56a26ea


** Changed in: charm-openstack-dashboard
       Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to horizon in Ubuntu.
https://bugs.launchpad.net/bugs/2039225

Title:
  django.core.cache.backends.memcached.MemcachedCache backend is
  removed

Status in OpenStack Dashboard Charm:
  Fix Committed
Status in Ubuntu Cloud Archive:
  Fix Released
Status in Ubuntu Cloud Archive bobcat series:
  Fix Released
Status in OpenStack Dashboard (Horizon):
  Fix Released
Status in horizon package in Ubuntu:
  Fix Released
Status in horizon source package in Mantic:
  Fix Released

Bug description:
  [Description]
  In 4.1 the django.core.cache.backends.memcached.MemcachedCache backend is removed.

  https://github.com/django/django/blob/main/docs/releases/4.1.txt#L749

  It's been deprecated since 3.2:

  https://docs.djangoproject.com/en/4.2/releases/3.2/#features-
  deprecated-in-3-2

  "The django.core.cache.backends.memcached.MemcachedCache backend is
  deprecated as python-memcached has some problems and seems to be
  unmaintained. Use django.core.cache.backends.memcached.PyMemcacheCache
  or django.core.cache.backends.memcached.PyLibMCCache instead."

  This results in the following error on Ubuntu Mantic:

  InvalidCacheBackendError at /
  Could not find backend 'django.core.cache.backends.memcached.MemcachedCache': Module "django.core.cache.backends.memcached" does not define a "MemcachedCache" attribute/class
  Request Method:	GET
  Request URL:	http://10.5.3.66/horizon/
  Django Version:	4.2.4
  Exception Type:	InvalidCacheBackendError
  Exception Value:
  Could not find backend 'django.core.cache.backends.memcached.MemcachedCache': Module "django.core.cache.backends.memcached" does not define a "MemcachedCache" 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.11.6
  Python Path:
  ['/usr/lib/python3/dist-packages',
   '/usr/lib/python311.zip',
   '/usr/lib/python3.11',
   '/usr/lib/python3.11/lib-dynload',
   '/usr/local/lib/python3.11/dist-packages',
   '/usr/lib/python3/dist-packages',
   '/usr/lib/python3/dist-packages/openstack_dashboard']
  Server time:	Thu, 12 Oct 2023 20:44:30 +0000

  [Test Case]
  Deploy openstack with the openstack-dashboard (horizon) on Ubuntu mantic. Ensure the dashboard is functional and no errors in /var/log/apache/error.log.

  [Regression Potential]
  This fix is inline with the upstream. Currently the dashboard is not functional without this fix.

To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-openstack-dashboard/+bug/2039225/+subscriptions




More information about the Ubuntu-openstack-bugs mailing list