From 91d945431fdf7e4edae8a406e678ada40629d4e9 Mon Sep 17 00:00:00 2001 From: Christy Perez Date: Thu, 7 May 2015 16:52:29 -0500 Subject: [PATCH] Log ssh command output to Debug I struggled to figure out why a machine create was failing, and eventually asked if anyone else had seen the vague error I was getting: "Error creating machine: Process exited with: 100. Reason was: ()" It is immensely helpful if we log the command output instead of just the rc. It would also have been useful if the driver providers used the output, but this covers most scenarios since they don't. Signed-off-by: Christy Perez --- drivers/utils.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/utils.go b/drivers/utils.go index 793ec3630e..fb7bcc24b5 100644 --- a/drivers/utils.go +++ b/drivers/utils.go @@ -30,7 +30,9 @@ func RunSSHCommandFromDriver(d Driver, command string) (ssh.Output, error) { return output, err } - return client.Run(command) + output, err = client.Run(command) + log.Debug(fmt.Sprintf("SSH cmd err, output: %v: %s", err, output)) + return output, err } func sshAvailableFunc(d Driver) func() bool {