Merge "Deprecate sqlite cache driver"

This commit is contained in:
Zuul 2024-02-14 10:16:06 +00:00 committed by Gerrit Code Review
commit 7fd459fef2
3 changed files with 26 additions and 0 deletions

View File

@ -56,6 +56,11 @@ store the information about cached images:
information. It also requires a filesystem that sets ``atime`` on the files
when accessed.
Deprecation warning:
* As centralized database will now be used for image cache management, the
use of `sqlite` database and driver will be dropped from 'E' (2025.1)
development cycle.
Possible values:
* sqlite
* xattr

View File

@ -36,8 +36,17 @@ from glance.image_cache.drivers import base
LOG = logging.getLogger(__name__)
DEPRECATION_REASON = """
As centralized database will now be used for image cache management, the use
of `sqlite` database and driver will be dropped from 'E' (2025.1)
development cycle.
"""
sqlite_opts = [
cfg.StrOpt('image_cache_sqlite_db', default='cache.db',
deprecated_for_removal=True,
deprecated_reason=DEPRECATION_REASON,
deprecated_since='Caracal (2024.1)',
help=_("""
The relative path to sqlite file database that will be used for image cache
management.
@ -111,6 +120,7 @@ class Driver(base.Driver):
this method. If the store was not able to successfully configure
itself, it should raise `exception.BadDriverConfiguration`
"""
LOG.warning(_(DEPRECATION_REASON))
super(Driver, self).configure()
# Create the SQLite database that will hold our cache attributes

View File

@ -0,0 +1,11 @@
---
deprecations:
- |
The Glance cache driver ``sqlite`` is deprecated in this release and
is subject to removal at the beginning of the `E` (2025.1)
development cycle, following the `OpenStack standard deprecation policy
<https://governance.openstack.org/reference/tags/assert_follows-standard-deprecation.html>`_.
The configuration option ``image_cache_sqlite_db`` related to ``sqlite``
cache driver is also deprecated and is subject to removal at the
beginning of `E` (2025.1) development cycle.