diff --git a/nova/conf/cinder.py b/nova/conf/cinder.py index 68a6c46b6c27..71ce48ff90e8 100644 --- a/nova/conf/cinder.py +++ b/nova/conf/cinder.py @@ -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. """), ] diff --git a/nova/config.py b/nova/config.py index 98aad0c73f18..545fc5714591 100644 --- a/nova/config.py +++ b/nova/config.py @@ -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') diff --git a/releasenotes/notes/cinder-debug-c522618d82987971.yaml b/releasenotes/notes/cinder-debug-c522618d82987971.yaml new file mode 100644 index 000000000000..5eb8a7642510 --- /dev/null +++ b/releasenotes/notes/cinder-debug-c522618d82987971.yaml @@ -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.