Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support --force for overriding the ssh check #6237

Merged
merged 4 commits into from
Feb 5, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Skip trySSH entirely if --force is set
  • Loading branch information
tstromberg committed Jan 31, 2020
commit 9b5044bfb2e3ff721bde0bb90de9317f6ab27907
7 changes: 5 additions & 2 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,10 @@ func validateNetwork(h *host.Host, r command.Runner) string {
}

func trySSH(h *host.Host, ip string) {
if viper.GetBool(force) {
return
}

sshAddr := net.JoinHostPort(ip, "22")

dial := func() (err error) {
Expand All @@ -1097,8 +1101,7 @@ func trySSH(h *host.Host, ip string) {
}

if err := retry.Expo(dial, time.Second, 13*time.Second); err != nil {
if !viper.GetBool(force) {
exit.WithCodeT(exit.IO, `minikube is unable to connect to the VM: {{.error}}
exit.WithCodeT(exit.IO, `minikube is unable to connect to the VM: {{.error}}

This is likely due to one of two reasons:

Expand Down