Merge "add additional deprecation warnings for KVS options"

This commit is contained in:
Jenkins 2017-01-28 03:01:05 +00:00 committed by Gerrit Code Review
commit e90296a44f
6 changed files with 54 additions and 0 deletions

View File

@ -17,11 +17,16 @@
import copy
from dogpile.cache import api
from oslo_log import versionutils
NO_VALUE = api.NO_VALUE
@versionutils.deprecated(
versionutils.deprecated.OCATA,
what='keystone.common.kvs.backends.MemoryBackend',
remove_in=+1)
class MemoryBackend(api.CacheBackend):
"""A backend that uses a plain dictionary.

View File

@ -20,6 +20,7 @@ import time
from dogpile.cache import api
from dogpile.cache.backends import memcached
from oslo_cache.backends import memcache_pool
from oslo_log import versionutils
from six.moves import range
import keystone.conf
@ -72,6 +73,10 @@ class MemcachedLock(object):
client.delete(self.key)
@versionutils.deprecated(
versionutils.deprecated.OCATA,
what='keystone.common.kvs.backends.MemcachedBackend',
remove_in=+1)
class MemcachedBackend(object):
"""Pivot point to leverage the various dogpile.cache memcached backends.

View File

@ -11,13 +11,23 @@
# under the License.
from oslo_config import cfg
from oslo_log import versionutils
from keystone.conf import utils
_DEPRECATE_KVS_MSG = utils.fmt("""
This option has been deprecated in the O release and will be removed in the P
release. Use SQL backends instead.
""")
backends = cfg.ListOpt(
'backends',
default=[],
deprecated_for_removal=True,
deprecated_reason=_DEPRECATE_KVS_MSG,
deprecated_since=versionutils.deprecated.OCATA,
help=utils.fmt("""
Extra `dogpile.cache` backend modules to register with the `dogpile.cache`
library. It is not necessary to set this value unless you are providing a
@ -27,6 +37,9 @@ custom KVS backend beyond what `dogpile.cache` already supports.
config_prefix = cfg.StrOpt(
'config_prefix',
default='keystone.kvs',
deprecated_for_removal=True,
deprecated_reason=_DEPRECATE_KVS_MSG,
deprecated_since=versionutils.deprecated.OCATA,
help=utils.fmt("""
Prefix for building the configuration dictionary for the KVS region. This
should not need to be changed unless there is another `dogpile.cache` region
@ -36,6 +49,9 @@ with the same configuration name.
enable_key_mangler = cfg.BoolOpt(
'enable_key_mangler',
default=True,
deprecated_for_removal=True,
deprecated_reason=_DEPRECATE_KVS_MSG,
deprecated_since=versionutils.deprecated.OCATA,
help=utils.fmt("""
Set to false to disable using a key-mangling function, which ensures
fixed-length keys are used in the KVS store. This is configurable for debugging
@ -47,6 +63,9 @@ default_lock_timeout = cfg.IntOpt(
'default_lock_timeout',
default=5,
min=0,
deprecated_for_removal=True,
deprecated_reason=_DEPRECATE_KVS_MSG,
deprecated_since=versionutils.deprecated.OCATA,
help=utils.fmt("""
Number of seconds after acquiring a distributed lock that the backend should
consider the lock to be expired. This option should be tuned relative to the

View File

@ -11,13 +11,23 @@
# under the License.
from oslo_config import cfg
from oslo_log import versionutils
from keystone.conf import utils
_DEPRECATE_KVS_MSG = utils.fmt("""
This option has been deprecated in the O release and will be removed in the P
release. Use oslo.cache instead.
""")
servers = cfg.ListOpt(
'servers',
default=['localhost:11211'],
deprecated_for_removal=True,
deprecated_reason=_DEPRECATE_KVS_MSG,
deprecated_since=versionutils.deprecated.OCATA,
help=utils.fmt("""
Comma-separated list of memcached servers in the format of
`host:port,host:port` that keystone should use for the `memcache` token

View File

@ -18,6 +18,7 @@ import copy
import threading
from oslo_log import log
from oslo_log import versionutils
from oslo_utils import timeutils
import six
@ -36,6 +37,10 @@ LOG = log.getLogger(__name__)
STORE_CONF_LOCK = threading.Lock()
@versionutils.deprecated(
versionutils.deprecated.OCATA,
what='keystone.token.persistence.backends.kvs.Token',
remove_in=+1)
class Token(token.persistence.TokenDriverBase):
"""KeyValueStore backend for tokens.

View File

@ -7,3 +7,13 @@ deprecations:
It is recommended to replace the ``endpoint_filter.sql`` catalog backend
with the ``sql`` backend. The ``endpoint_filter.sql`` backend will be
removed in the `Pike` release.
- >
[`blueprint deprecated-as-of-ocata <https://blueprints.launchpad.net/keystone/+spec/deprecated-as-of-ocata>`_]
Various KVS backends and config options have been deprecated and will be
removed in the `Pike` release. This includes:
* ``keystone.common.kvs.backends.inmemdb.MemoryBackend``
* ``keystone.common.kvs.backends.memcached.MemcachedBackend``
* ``keystone.token.persistence.backends.kvs.Token``
* all config options under ``[kvs]`` in `keystone.conf`
* the config option ``[memcached] servers`` in `keystone.conf`