From: Melissa Li Date: Wed, 23 Feb 2022 16:57:45 +0000 (-0500) Subject: mgr/cephadm: reduce log level for asyncssh error messages X-Git-Tag: v18.0.0~1336^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=95d5db0f4297286c420057ac10f1b63d3116eace;p=ceph-ci.git mgr/cephadm: reduce log level for asyncssh error messages Fixes: https://tracker.ceph.com/issues/54132 Signed-off-by: Melissa Li --- diff --git a/src/pybind/mgr/cephadm/ssh.py b/src/pybind/mgr/cephadm/ssh.py index 034688023e9..75b3efcec39 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: