Merge pull request #109314 from SergeyKanzhelev/properRetryInSSH

fix the retry logic in ssh in test framework
This commit is contained in:
Kubernetes Prow Robot 2022-04-05 13:34:01 -07:00 committed by GitHub
commit 25fa92cd7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
})