mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 02:41:25 +00:00
fix the retry logic in ssh in test framework
This commit is contained in:
parent
c13d3369d5
commit
ee80dd19db
@ -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
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user