config: Document backends supporting specific options

... and shows the backend actually picked up in logs.

Change-Id: Ib19fdd289444a8db5ebc682e7cb5723b994ae9dc
This commit is contained in:
Takashi Kajinami 2024-02-12 20:28:01 +09:00
parent 7bb43bbbd5
commit 76d414e58d
2 changed files with 16 additions and 4 deletions

View File

@ -152,7 +152,12 @@ FILE_OPTIONS = {
cfg.BoolOpt('tls_enabled', cfg.BoolOpt('tls_enabled',
default=False, default=False,
help='Global toggle for TLS usage when communicating with' 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', cfg.StrOpt('tls_cafile',
default=None, default=None,
help='Path to a file of concatenated CA certificates in PEM' 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' help='Set the available ciphers for sockets created with'
' the TLS context. It should be a string in the OpenSSL' ' the TLS context. It should be a string in the OpenSSL'
' cipher list format. If not specified, all OpenSSL enabled' ' 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( cfg.BoolOpt(
'enable_socket_keepalive', 'enable_socket_keepalive',
default=False, default=False,
@ -246,7 +254,10 @@ FILE_OPTIONS = {
'environments and may have been backported to older ' 'environments and may have been backported to older '
'Python versions on select environments. If the Python ' 'Python versions on select environments. If the Python '
'executable used does not support OpenSSL FIPS mode, ' '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``.'),
], ],
} }

View File

@ -299,7 +299,8 @@ def _build_cache_config(conf):
{}).update(conn_kwargs) {}).update(conn_kwargs)
else: else:
msg = _( 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." "backend."
) )
raise exception.ConfigurationError(msg) raise exception.ConfigurationError(msg)