From 6708fa60e970b1305c87478fb433a83d0be8bace Mon Sep 17 00:00:00 2001 From: Abhishek Kekane Date: Tue, 31 Oct 2023 14:37:35 +0000 Subject: [PATCH] Deprecate sqlite cache driver sqlite cache driver and related configuration options will be deprecated from this cycle. Related blueprint centralized-cache-db Change-Id: I0c1affff05a2a4c2838cfad2b637e7660b056eef --- glance/image_cache/__init__.py | 5 +++++ glance/image_cache/drivers/sqlite.py | 10 ++++++++++ ...eprecate-sqlite-cache-driver-1f5f67862f56e0ba.yaml | 11 +++++++++++ 3 files changed, 26 insertions(+) create mode 100644 releasenotes/notes/deprecate-sqlite-cache-driver-1f5f67862f56e0ba.yaml diff --git a/glance/image_cache/__init__.py b/glance/image_cache/__init__.py index 582edb0452..61ee7de416 100644 --- a/glance/image_cache/__init__.py +++ b/glance/image_cache/__init__.py @@ -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 diff --git a/glance/image_cache/drivers/sqlite.py b/glance/image_cache/drivers/sqlite.py index e5c14a09cc..ab308f23f9 100644 --- a/glance/image_cache/drivers/sqlite.py +++ b/glance/image_cache/drivers/sqlite.py @@ -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 diff --git a/releasenotes/notes/deprecate-sqlite-cache-driver-1f5f67862f56e0ba.yaml b/releasenotes/notes/deprecate-sqlite-cache-driver-1f5f67862f56e0ba.yaml new file mode 100644 index 0000000000..926b2356da --- /dev/null +++ b/releasenotes/notes/deprecate-sqlite-cache-driver-1f5f67862f56e0ba.yaml @@ -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 + `_. + + 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.