Skip to content

Commit 90826fe

Browse files
authored
Log stdout and stderr if ssh isn't available (#2252)
1 parent 0661b74 commit 90826fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

e2e/cluster/cmx/cluster.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,11 @@ func waitForSSH(node Node) error {
220220
case <-timeout:
221221
return fmt.Errorf("timed out after 5 minutes: last error: %w", lastErr)
222222
case <-tick:
223-
_, _, err := runCommandOnNode(node, []string{"uptime"})
223+
stdout, stderr, err := runCommandOnNode(node, []string{"uptime"})
224224
if err == nil {
225225
return nil
226226
}
227-
lastErr = err
227+
lastErr = fmt.Errorf("%w: stdout: %s: stderr: %s", err, stdout, stderr)
228228
}
229229
}
230230
}

0 commit comments

Comments
 (0)