From 76d414e58d1edd416cb96f0f054dc4b7f0bc1dcf Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 12 Feb 2024 20:28:01 +0900 Subject: [PATCH] config: Document backends supporting specific options ... and shows the backend actually picked up in logs. Change-Id: Ib19fdd289444a8db5ebc682e7cb5723b994ae9dc --- oslo_cache/_opts.py | 17 ++++++++++++++--- oslo_cache/core.py | 3 ++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/oslo_cache/_opts.py b/oslo_cache/_opts.py index 0d4fd416..ae464991 100644 --- a/oslo_cache/_opts.py +++ b/oslo_cache/_opts.py @@ -152,7 +152,12 @@ FILE_OPTIONS = { cfg.BoolOpt('tls_enabled', default=False, help='Global toggle for TLS usage when communicating with' - ' the caching servers.'), + ' the caching servers. Currently supported by ' + '``dogpile.cache.bmemcache``, ' + '``dogpile.cache.pymemcache``, ' + '``oslo_cache.memcache_pool``, ' + '``dogpile.cache.redis`` and ' + '``dogpile.cache.redis_sentinel``.'), cfg.StrOpt('tls_cafile', default=None, help='Path to a file of concatenated CA certificates in PEM' @@ -178,7 +183,10 @@ FILE_OPTIONS = { help='Set the available ciphers for sockets created with' ' the TLS context. It should be a string in the OpenSSL' ' cipher list format. If not specified, all OpenSSL enabled' - ' ciphers will be available.'), + ' ciphers will be available. Currently supported by ' + '``dogpile.cache.bmemcache``, ' + '``dogpile.cache.pymemcache`` and ' + '``oslo_cache.memcache_pool``.'), cfg.BoolOpt( 'enable_socket_keepalive', default=False, @@ -246,7 +254,10 @@ FILE_OPTIONS = { 'environments and may have been backported to older ' 'Python versions on select environments. If the Python ' 'executable used does not support OpenSSL FIPS mode, ' - 'an exception will be raised.'), + 'an exception will be raised. Currently supported by ' + '``dogpile.cache.bmemcache``, ' + '``dogpile.cache.pymemcache`` and ' + '``oslo_cache.memcache_pool``.'), ], } diff --git a/oslo_cache/core.py b/oslo_cache/core.py index 8a93c046..ec332a65 100644 --- a/oslo_cache/core.py +++ b/oslo_cache/core.py @@ -299,7 +299,8 @@ def _build_cache_config(conf): {}).update(conn_kwargs) else: msg = _( - "TLS setting via [cache] tls_enabled is not supported by this " + "TLS setting via [cache] tls_enabled is not supported by the " + "%s backend. Set [cache] tls_enabled=False or use a different " "backend." ) raise exception.ConfigurationError(msg)