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

start: Remove create/delete retry loop #6129

Merged
merged 1 commit into from
Dec 20, 2019
Merged
Changes from all commits
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
17 changes: 3 additions & 14 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -1006,20 +1006,9 @@ func startHost(api libmachine.API, mc cfg.MachineConfig) (*host.Host, bool) {
exit.WithError("Failed to check if machine exists", err)
}

var host *host.Host
start := func() (err error) {
host, err = cluster.StartHost(api, mc)
if err != nil {
out.T(out.Resetting, "Retriable failure: {{.error}}", out.V{"error": err})
if derr := cluster.DeleteHost(api, mc.Name); derr != nil {
glog.Warningf("DeleteHost: %v", derr)
}
}
return err
}

if err = retry.Expo(start, 5*time.Second, 3*time.Minute, 3); err != nil {
exit.WithError("Unable to start VM", err)
host, err := cluster.StartHost(api, mc)
if err != nil {
exit.WithError("Unable to start VM. Please investigate and run 'minikube delete' if possible", err)
}
return host, exists
}
Expand Down