From bd70adf049f38ffda4b0d79f06930180cfa9e7c6 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Mon, 22 Jan 2024 21:33:29 +0100 Subject: [PATCH] Deprecate the "location_strategy" option Change-Id: Ied8c4366eb1cc2ebf83a96bd824631a4d8af3a00 --- glance/common/location_strategy/__init__.py | 7 +++++++ glance/common/location_strategy/store_type.py | 7 +++++++ .../deprecate-location_strategy-f658e69700204bbf.yaml | 11 +++++++++++ 3 files changed, 25 insertions(+) create mode 100644 releasenotes/notes/deprecate-location_strategy-f658e69700204bbf.yaml diff --git a/glance/common/location_strategy/__init__.py b/glance/common/location_strategy/__init__.py index f7bfe197b8..82f82334ed 100644 --- a/glance/common/location_strategy/__init__.py +++ b/glance/common/location_strategy/__init__.py @@ -23,6 +23,13 @@ from glance.i18n import _, _LE location_strategy_opts = [ cfg.StrOpt('location_strategy', + deprecated_for_removal=True, + deprecated_since="Caracal", + deprecated_reason=_(""" +In Bobcat, a new weighing mechanism has been introduced, which makes the +location strategy obsolete. This option is scheduled to be removed during the +Dalmatian development cycle. +"""), default='location_order', choices=('location_order', 'store_type'), help=_(""" diff --git a/glance/common/location_strategy/store_type.py b/glance/common/location_strategy/store_type.py index dca4536116..f6fc3eb9a0 100644 --- a/glance/common/location_strategy/store_type.py +++ b/glance/common/location_strategy/store_type.py @@ -24,6 +24,13 @@ from glance.i18n import _ store_type_opts = [ cfg.ListOpt('store_type_preference', default=[], + deprecated_for_removal=True, + deprecated_since="Caracal", + deprecated_reason=_(""" +In Bobcat, a new weighing mechanism has been introduced, which makes the +location strategy obsolete. This option is scheduled to be removed during the +Dalmatian development cycle. +"""), help=_(""" Preference order of storage backends. diff --git a/releasenotes/notes/deprecate-location_strategy-f658e69700204bbf.yaml b/releasenotes/notes/deprecate-location_strategy-f658e69700204bbf.yaml new file mode 100644 index 0000000000..c370cc45a5 --- /dev/null +++ b/releasenotes/notes/deprecate-location_strategy-f658e69700204bbf.yaml @@ -0,0 +1,11 @@ +--- +deprecations: + - | + The Glance API configuration options ``location_strategy`` and + ``store_type_preference`` are deprecated in this release and are subject to + removal at the beginning of the Dalmatian development cycle, following the + `OpenStack standard deprecation policy + `_. + + The weighing mechanism introduced in the Bobcat development cycle can be + used by operators who would like to prioritize certain stores over others.