Merge "add additional deprecation warnings for KVS options"
This commit is contained in:
commit
e90296a44f
@ -17,11 +17,16 @@
|
|||||||
import copy
|
import copy
|
||||||
|
|
||||||
from dogpile.cache import api
|
from dogpile.cache import api
|
||||||
|
from oslo_log import versionutils
|
||||||
|
|
||||||
|
|
||||||
NO_VALUE = api.NO_VALUE
|
NO_VALUE = api.NO_VALUE
|
||||||
|
|
||||||
|
|
||||||
|
@versionutils.deprecated(
|
||||||
|
versionutils.deprecated.OCATA,
|
||||||
|
what='keystone.common.kvs.backends.MemoryBackend',
|
||||||
|
remove_in=+1)
|
||||||
class MemoryBackend(api.CacheBackend):
|
class MemoryBackend(api.CacheBackend):
|
||||||
"""A backend that uses a plain dictionary.
|
"""A backend that uses a plain dictionary.
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ import time
|
|||||||
from dogpile.cache import api
|
from dogpile.cache import api
|
||||||
from dogpile.cache.backends import memcached
|
from dogpile.cache.backends import memcached
|
||||||
from oslo_cache.backends import memcache_pool
|
from oslo_cache.backends import memcache_pool
|
||||||
|
from oslo_log import versionutils
|
||||||
from six.moves import range
|
from six.moves import range
|
||||||
|
|
||||||
import keystone.conf
|
import keystone.conf
|
||||||
@ -72,6 +73,10 @@ class MemcachedLock(object):
|
|||||||
client.delete(self.key)
|
client.delete(self.key)
|
||||||
|
|
||||||
|
|
||||||
|
@versionutils.deprecated(
|
||||||
|
versionutils.deprecated.OCATA,
|
||||||
|
what='keystone.common.kvs.backends.MemcachedBackend',
|
||||||
|
remove_in=+1)
|
||||||
class MemcachedBackend(object):
|
class MemcachedBackend(object):
|
||||||
"""Pivot point to leverage the various dogpile.cache memcached backends.
|
"""Pivot point to leverage the various dogpile.cache memcached backends.
|
||||||
|
|
||||||
|
@ -11,13 +11,23 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
from oslo_log import versionutils
|
||||||
|
|
||||||
from keystone.conf import utils
|
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 = cfg.ListOpt(
|
||||||
'backends',
|
'backends',
|
||||||
default=[],
|
default=[],
|
||||||
|
deprecated_for_removal=True,
|
||||||
|
deprecated_reason=_DEPRECATE_KVS_MSG,
|
||||||
|
deprecated_since=versionutils.deprecated.OCATA,
|
||||||
help=utils.fmt("""
|
help=utils.fmt("""
|
||||||
Extra `dogpile.cache` backend modules to register with the `dogpile.cache`
|
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
|
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 = cfg.StrOpt(
|
||||||
'config_prefix',
|
'config_prefix',
|
||||||
default='keystone.kvs',
|
default='keystone.kvs',
|
||||||
|
deprecated_for_removal=True,
|
||||||
|
deprecated_reason=_DEPRECATE_KVS_MSG,
|
||||||
|
deprecated_since=versionutils.deprecated.OCATA,
|
||||||
help=utils.fmt("""
|
help=utils.fmt("""
|
||||||
Prefix for building the configuration dictionary for the KVS region. This
|
Prefix for building the configuration dictionary for the KVS region. This
|
||||||
should not need to be changed unless there is another `dogpile.cache` region
|
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 = cfg.BoolOpt(
|
||||||
'enable_key_mangler',
|
'enable_key_mangler',
|
||||||
default=True,
|
default=True,
|
||||||
|
deprecated_for_removal=True,
|
||||||
|
deprecated_reason=_DEPRECATE_KVS_MSG,
|
||||||
|
deprecated_since=versionutils.deprecated.OCATA,
|
||||||
help=utils.fmt("""
|
help=utils.fmt("""
|
||||||
Set to false to disable using a key-mangling function, which ensures
|
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
|
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_lock_timeout',
|
||||||
default=5,
|
default=5,
|
||||||
min=0,
|
min=0,
|
||||||
|
deprecated_for_removal=True,
|
||||||
|
deprecated_reason=_DEPRECATE_KVS_MSG,
|
||||||
|
deprecated_since=versionutils.deprecated.OCATA,
|
||||||
help=utils.fmt("""
|
help=utils.fmt("""
|
||||||
Number of seconds after acquiring a distributed lock that the backend should
|
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
|
consider the lock to be expired. This option should be tuned relative to the
|
||||||
|
@ -11,13 +11,23 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
from oslo_log import versionutils
|
||||||
|
|
||||||
from keystone.conf import utils
|
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 = cfg.ListOpt(
|
||||||
'servers',
|
'servers',
|
||||||
default=['localhost:11211'],
|
default=['localhost:11211'],
|
||||||
|
deprecated_for_removal=True,
|
||||||
|
deprecated_reason=_DEPRECATE_KVS_MSG,
|
||||||
|
deprecated_since=versionutils.deprecated.OCATA,
|
||||||
help=utils.fmt("""
|
help=utils.fmt("""
|
||||||
Comma-separated list of memcached servers in the format of
|
Comma-separated list of memcached servers in the format of
|
||||||
`host:port,host:port` that keystone should use for the `memcache` token
|
`host:port,host:port` that keystone should use for the `memcache` token
|
||||||
|
@ -18,6 +18,7 @@ import copy
|
|||||||
import threading
|
import threading
|
||||||
|
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
from oslo_log import versionutils
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
import six
|
import six
|
||||||
|
|
||||||
@ -36,6 +37,10 @@ LOG = log.getLogger(__name__)
|
|||||||
STORE_CONF_LOCK = threading.Lock()
|
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):
|
class Token(token.persistence.TokenDriverBase):
|
||||||
"""KeyValueStore backend for tokens.
|
"""KeyValueStore backend for tokens.
|
||||||
|
|
||||||
|
@ -7,3 +7,13 @@ deprecations:
|
|||||||
It is recommended to replace the ``endpoint_filter.sql`` catalog backend
|
It is recommended to replace the ``endpoint_filter.sql`` catalog backend
|
||||||
with the ``sql`` backend. The ``endpoint_filter.sql`` backend will be
|
with the ``sql`` backend. The ``endpoint_filter.sql`` backend will be
|
||||||
removed in the `Pike` release.
|
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`
|
||||||
|
Loading…
Reference in New Issue
Block a user