From 95d5db0f4297286c420057ac10f1b63d3116eace Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Wed, 23 Feb 2022 11:57:45 -0500 Subject: [PATCH] mgr/cephadm: reduce log level for asyncssh error messages Fixes: https://tracker.ceph.com/issues/54132 Signed-off-by: Melissa Li --- src/pybind/mgr/cephadm/ssh.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pybind/mgr/cephadm/ssh.py b/src/pybind/mgr/cephadm/ssh.py index 034688023e9bf..75b3efcec397e 100644 --- a/src/pybind/mgr/cephadm/ssh.py +++ b/src/pybind/mgr/cephadm/ssh.py @@ -92,7 +92,7 @@ class SSHManager: def redirect_log(self, host: str, addr: str) -> Iterator[None]: log_string = StringIO() ch = logging.StreamHandler(log_string) - ch.setLevel(logging.DEBUG) + ch.setLevel(logging.INFO) asyncssh_logger.addHandler(ch) try: @@ -100,8 +100,7 @@ class SSHManager: except OSError as e: self.mgr.offline_hosts.add(host) log_content = log_string.getvalue() - msg = f"Can't communicate with remote host `{addr}`, possibly because python3 is not installed there. {str(e)}" + \ - '\n' + f'Log: {log_content}' + msg = f"Can't communicate with remote host `{addr}`, possibly because python3 is not installed there. {str(e)}" logger.exception(msg) raise OrchestratorError(msg) except asyncssh.Error as e: -- 2.39.5