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

Increase host creation timeout #7565

Merged
merged 2 commits into from
Apr 16, 2020
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
4 changes: 2 additions & 2 deletions pkg/minikube/machine/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ func createHost(api libmachine.API, cfg config.ClusterConfig, n config.Node) (*h

cstart := time.Now()
glog.Infof("libmachine.API.Create for %q (driver=%q)", cfg.Name, cfg.Driver)
// Allow two minutes to create host before failing fast
if err := timedCreateHost(h, api, 2*time.Minute); err != nil {

if err := timedCreateHost(h, api, 4*time.Minute); err != nil {
Copy link
Member

@medyagh medyagh Apr 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one of the reasons that this was made lower was to catch
connecting to SSH...

that meant the SSH keys were not copied to the machine, and no matter how long u try it would not be helpful

how about make this timedCreateHost smarter and fail fast on the things that we can do NOTHING about it
(like SSH problems or network or something like that ?) and for other use cases we can even make it wait longer than 4 mins, we can even do 6 ( good for slow CI machines)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here is the exact error message if you wanna catch that one to fail fast:

I0212 20:18:31.490329   17811 main.go:110] libmachine: Error dialing TCP: dial tcp 192.168.64.44:22: connect: connection refused
I0212 20:18:35.497395   17811 main.go:110] libmachine: Error dialing TCP: dial tcp 192.168.64.44:22: connect: connection refused
I0212 20:18:39.502636   17811 main.go:110] libmachine: Error dialing TCP: dial tcp 192.168.64.44:22: connect: connection refused
I0212 20:18:43.512406   17811 main.go:110] libmachine: Error dialing TCP: dial tcp 192.168.64.44:22: connect: connection refused

(maybe this might need a PR on libmachine (not sure))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's feasible to detect other conditions. Is 3 minutes an acceptable compromise?

return nil, errors.Wrap(err, "creating host")
}
glog.Infof("libmachine.API.Create for %q took %s", cfg.Name, time.Since(cstart))
Expand Down