Deprecate glance scrubber

Deprecate the glance scrubber utility and its associated
configuration options for removal during the 2024.2 (Dalmatian)
development cycle.

Removal of the scrubber was proposed on the mailing list on
2024-02-01:

https://lists.openstack.org/archives/list/openstack-discuss@lists.openstack.org/thread/33F37CL4NUE3QI6GYBWG5BL5UNBK4L5U/

No objections were raised.

Change-Id: I82d9e7bf3f1f582030ac7729d729a746784c668f
This commit is contained in:
Brian Rosmaita 2024-02-24 12:27:52 -05:00
parent 02be49c998
commit b059afbe2c
2 changed files with 44 additions and 0 deletions

View File

@ -20,6 +20,7 @@ import eventlet
from glance_store import exceptions as store_exceptions
from oslo_config import cfg
from oslo_log import log as logging
from oslo_log import versionutils
from oslo_utils import encodeutils
from glance.common import crypt
@ -30,9 +31,18 @@ import glance.db as db_api
from glance.i18n import _, _LC, _LE, _LI, _LW
LOG = logging.getLogger(__name__)
DEPRECATED_SUBSTRING = ('is scheduled to be removed during the 2024.2 '
'(Dalmatian) development cycle.')
DEPRECATED_SCRUBBER_MSG = ('The glance scrubber has been deprecated and '
+ DEPRECATED_SUBSTRING)
DEPRECATED_OPTS_MSG = ('The entire glance scrubber, including this option, '
+ DEPRECATED_SUBSTRING)
scrubber_opts = [
cfg.IntOpt('scrub_time', default=0, min=0,
deprecated_for_removal=True,
deprecated_since='2024.1 (Caracal)',
deprecated_reason=DEPRECATED_OPTS_MSG,
help=_("""
The amount of time, in seconds, to delay image scrubbing.
@ -55,6 +65,9 @@ Related options:
""")),
cfg.IntOpt('scrub_pool_size', default=1, min=1,
deprecated_for_removal=True,
deprecated_since='2024.1 (Caracal)',
deprecated_reason=DEPRECATED_OPTS_MSG,
help=_("""
The size of thread pool to be used for scrubbing images.
@ -73,6 +86,9 @@ Related options:
""")),
cfg.BoolOpt('delayed_delete', default=False,
deprecated_for_removal=True,
deprecated_since='2024.1 (Caracal)',
deprecated_reason=DEPRECATED_OPTS_MSG,
help=_("""
Turn on/off delayed delete.
@ -104,6 +120,9 @@ Related options:
scrubber_cmd_opts = [
cfg.IntOpt('wakeup_time', default=300, min=0,
deprecated_for_removal=True,
deprecated_since='2024.1 (Caracal)',
deprecated_reason=DEPRECATED_OPTS_MSG,
help=_("""
Time interval, in seconds, between scrubber runs in daemon mode.
@ -130,6 +149,9 @@ scrubber_cmd_cli_opts = [
cfg.BoolOpt('daemon',
short='D',
default=False,
deprecated_for_removal=True,
deprecated_since='2024.1 (Caracal)',
deprecated_reason=DEPRECATED_OPTS_MSG,
help=_("""
Run scrubber as a daemon.
@ -153,6 +175,9 @@ Related options:
""")),
cfg.StrOpt('restore',
metavar='<IMAGE_ID>',
deprecated_for_removal=True,
deprecated_since='2024.1 (Caracal)',
deprecated_reason=DEPRECATED_OPTS_MSG,
help=_("""
Restore the image status from 'pending_delete' to 'active'.
@ -288,6 +313,7 @@ def get_scrub_queue():
class Daemon(object):
def __init__(self, wakeup_time=300, threads=100):
versionutils.report_deprecated_feature(LOG, DEPRECATED_SCRUBBER_MSG)
LOG.info(_LI("Starting Daemon: wakeup_time=%(wakeup_time)s "
"threads=%(threads)s"),
{'wakeup_time': wakeup_time, 'threads': threads})
@ -315,6 +341,7 @@ class Daemon(object):
class Scrubber(object):
def __init__(self, store_api):
versionutils.report_deprecated_feature(LOG, DEPRECATED_SCRUBBER_MSG)
LOG.info(_LI("Initializing scrubber"))
self.store_api = store_api
self.admin_context = context.get_admin_context(show_deleted=True)

View File

@ -0,0 +1,17 @@
---
deprecations:
- |
The Glance scrubber, which is invoked by the ``glance-scrubber``
command, is deprecated in this release and is subject to removal at the
beginning of the 2024.2 (Dalmatian) development cycle, following the
`OpenStack standard deprecation policy
<https://governance.openstack.org/reference/tags/assert_follows-standard-deprecation.html>`_.
This deprecation notice also applies to the following configuration
options:
* ``delayed_delete``
* ``scrub_time``
* ``scrub_pool_size``
* ``wakeup_time``