fix the retry logic in ssh in test framework

This commit is contained in:
Sergey Kanzhelev 2022-04-05 17:14:58 +00:00
parent c13d3369d5
commit ee80dd19db

View File

@ -244,7 +244,7 @@ func runSSHCommand(cmd, user, host string, signer ssh.Signer) (string, string, i
err = wait.Poll(5*time.Second, 20*time.Second, func() (bool, error) {
fmt.Printf("error dialing %s@%s: '%v', retrying\n", user, host, err)
if client, err = ssh.Dial("tcp", host, config); err != nil {
return false, err
return false, nil // retrying, error will be logged above
}
return true, nil
})