From 2eb8268da9e073a5febe9f21bc3432138dff43b6 Mon Sep 17 00:00:00 2001 From: Tom Barron Date: Sun, 30 Dec 2018 16:55:14 -0600 Subject: [PATCH] Set paramiko logging to DEBUG level Connections to backends via paramiko often fail for obscure reasons. If the service log level is DEBUG, increase paramiko logging to DEBUG level as well so that we have more information when issues of this sort occur. Change-Id: I44d8902d58c2ad48b8a37dfbff96c5b9471651e4 (cherry picked from commit 575d6ae62140681b0be6ef2eccec5b3664524a6d) (cherry picked from commit 0cde7b098d4a3e1dc654f0b227a4bbf99295cff4) (cherry picked from commit 0b47c687e0cfea06b1927375e27d9d4a46a19f88) --- manila/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/manila/utils.py b/manila/utils.py index f54472a471..aec9317524 100644 --- a/manila/utils.py +++ b/manila/utils.py @@ -54,6 +54,8 @@ from manila.i18n import _ CONF = cfg.CONF LOG = log.getLogger(__name__) +if hasattr('CONF', 'debug') and CONF.debug: + logging.getLogger("paramiko").setLevel(logging.DEBUG) _ISO8601_TIME_FORMAT_SUBSECOND = '%Y-%m-%dT%H:%M:%S.%f' _ISO8601_TIME_FORMAT = '%Y-%m-%dT%H:%M:%S'