mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-28 04:13:52 +00:00
make SSH logging in e2e more consistent
This commit is contained in:
@@ -85,11 +85,11 @@ func logCore(cmds []command, hosts []string, dir, provider string) {
|
||||
defer wg.Done()
|
||||
logfile := fmt.Sprintf("%s/%s-%s.log", dir, host, cmd.component)
|
||||
fmt.Printf("Writing to %s.\n", logfile)
|
||||
stdout, stderr, _, err := SSH(cmd.cmd, host, provider)
|
||||
result, err := SSH(cmd.cmd, host, provider)
|
||||
if err != nil {
|
||||
fmt.Printf("Error running command: %v\n", err)
|
||||
}
|
||||
if err := ioutil.WriteFile(logfile, []byte(stdout+stderr), 0777); err != nil {
|
||||
if err := ioutil.WriteFile(logfile, []byte(result.Stdout+result.Stderr), 0777); err != nil {
|
||||
fmt.Printf("Error writing logfile: %v\n", err)
|
||||
}
|
||||
}(cmd, host)
|
||||
|
||||
Reference in New Issue
Block a user