Open vannrt opened 6 years ago
Here's an example:
log.Printf("Running %q on machine %s. This may take a few minutes.", cmd, machine.Name)
out, err = session.CombinedOutput(cmd)
if err != nil {
return fmt.Errorf("error invoking ssh command %s", err)
}
log.Println(string(out))
When there is an error, we return an error string that includes the stderr
output only. We should also include stdout since it may contain helpful traces.
While running
cctl
and the machine actuator hits an error:The tool only prints the
stderr
output. We don't see the output ofstdout
. It's really hard to debug when the output of an error only saysProcess exited with status 1
.