conf: Allow cinderclient and os_brick to independently log at DEBUG

This change adds a simple [cinder]debug configurable to allow
cinderclient and os_brick to be made to log at DEBUG independently of
the rest of Nova.

Change-Id: I84f5b73adddf42831f1d9e129c25bf955e6eda78
This commit is contained in:
Lee Yarwood 2021-12-03 16:37:15 +00:00
parent 7670303aab
commit 159016a4c3
3 changed files with 17 additions and 0 deletions

View File

@ -103,6 +103,12 @@ By default there is no availability zone restriction on volume attach.
Related options:
* ``[DEFAULT]/default_schedule_zone``
"""),
cfg.BoolOpt('debug',
default=False,
help="""
Enable DEBUG logging with cinderclient and os_brick independently of the rest
of Nova.
"""),
]

View File

@ -70,6 +70,11 @@ def set_log_defaults():
extra_default_log_levels = ['glanceclient=DEBUG']
else:
extra_default_log_levels = ['glanceclient=WARN']
# Allow cinderclient and os_brick to log at DEBUG without Nova
if CONF.cinder.debug:
extra_default_log_levels += ['cinderclient=DEBUG', 'os_brick=DEBUG']
# NOTE(danms): DEBUG logging in privsep will result in some large
# and potentially sensitive things being logged.
extra_default_log_levels.append('oslo.privsep.daemon=INFO')

View File

@ -0,0 +1,6 @@
---
features:
- |
A new ``[cinder]/debug`` configurable has been introduced to enable DEBUG
logging for both the ``python-cinderclient`` and ``os-brick`` libraries
independently to the rest of Nova.