Skip to content

Commit

Permalink
Modify log message in debug_ssh
Browse files Browse the repository at this point in the history
In debug_ssh, if the raised exception is not instance of
tempest.lib.exceptions.SSHTimeout, then it maybe the instance
of exceptions.TimeoutException or exceptions.SSHExecCommandFailed,
which both indicate command executing error, but the log message
will display "Initializing SSH connection to %(ip)s failed." which
is not accurate. This is to change the log info to
"Executing command on %(ip)s failed."

Change-Id: I8f081e856231a609a32621240f3c6c22aa74c74e
  • Loading branch information
zhufl committed Dec 20, 2017
1 parent 36bc52d commit 35422ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tempest/lib/common/utils/linux/remote_client.py
Expand Up @@ -31,7 +31,7 @@ def wrapper(self, *args, **kwargs):
except Exception as e:
caller = test_utils.find_test_caller() or "not found"
if not isinstance(e, tempest.lib.exceptions.SSHTimeout):
message = ('Initializing SSH connection to %(ip)s failed. '
message = ('Executing command on %(ip)s failed. '
'Error: %(error)s' % {'ip': self.ip_address,
'error': e})
message = '(%s) %s' % (caller, message)
Expand Down

0 comments on commit 35422ac

Please sign in to comment.