Skip to content
Snippets Groups Projects
Commit a162cf5b authored by Iustin Pop's avatar Iustin Pop
Browse files

ssh: more details on failure

In case we fail without output from the ssh command, we should at least
add the exit code or any other failure reason to the error message, and
log it and the cmdline used to the node daemon log.

Reviewed-by: imsnah
parent a3f9f296
No related branches found
No related tags found
No related merge requests found
...@@ -219,6 +219,9 @@ class SshRunner: ...@@ -219,6 +219,9 @@ class SshRunner:
output = retval.output output = retval.output
if output: if output:
msg += ": %s" % output msg += ": %s" % output
else:
msg += ": %s (no output)" % retval.fail_reason
logging.error("Command %s failed: %s" % (retval.cmd, msg))
return False, msg return False, msg
remotehostname = retval.stdout.strip() remotehostname = retval.stdout.strip()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment