Commit c2d47be3 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #33071 from lojies/sshreturnerr

Automatic merge from submit-queue add err to return **What this PR does / why we need it**: when err != nil,it should return false, err **Which issue this PR fixes**: **Special notes for your reviewer**: **Release note**: <!-- Steps to write your release note: 1. Use the release-note-* labels to set the release note state (if you have access) 2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. --> ```release-note ```
parents b2c175c7 0d675fff
...@@ -217,7 +217,7 @@ func runSSHCommand(dialer sshDialer, cmd, user, host string, signer ssh.Signer, ...@@ -217,7 +217,7 @@ func runSSHCommand(dialer sshDialer, cmd, user, host string, signer ssh.Signer,
err = wait.Poll(5*time.Second, 20*time.Second, func() (bool, error) { err = wait.Poll(5*time.Second, 20*time.Second, func() (bool, error) {
fmt.Printf("error dialing %s@%s: '%v', retrying\n", user, host, err) fmt.Printf("error dialing %s@%s: '%v', retrying\n", user, host, err)
if client, err = dialer.Dial("tcp", host, config); err != nil { if client, err = dialer.Dial("tcp", host, config); err != nil {
return false, nil return false, err
} }
return true, nil return true, nil
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment