Skip to content

Commit

Permalink
Log more information for ssh command.
Browse files Browse the repository at this point in the history
Sometimes e2e test nodes are refused to reboot, but we didn't properly
catch the exit code. This one can give us more information on debugging.
  • Loading branch information
dchen1107 committed Jan 28, 2016
1 parent 3328cfe commit 7943708
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/e2e/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -2179,9 +2179,10 @@ func issueSSHCommand(cmd, provider string, node *api.Node) error {
if host == "" {
return fmt.Errorf("couldn't find external IP address for node %s", node.Name)
}
Logf("Calling %s on %s", cmd, node.Name)
if result, err := SSH(cmd, host, provider); result.Code != 0 || err != nil {
LogSSHResult(result)
Logf("Calling %s on %s(%s)", cmd, node.Name, host)
result, err := SSH(cmd, host, provider)
LogSSHResult(result)
if result.Code != 0 || err != nil {
return fmt.Errorf("failed running %q: %v (exit code %d)", cmd, err, result.Code)
}
return nil
Expand Down

0 comments on commit 7943708

Please sign in to comment.