Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4969)

Issue 94700048: Increase mongo timeout at bootstrap

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 11 months ago by wallyworld
Modified:
9 years, 11 months ago
Reviewers:
axw, mp+220745
Visibility:
Public.

Description

Increase mongo timeout at bootstrap A small tweak to allow the bootstrap command 5 minutes to connnect to mongo before timing out. This is needed because some machines are slow and mongo does not start fast enough. https://code.launchpad.net/~wallyworld/juju-core/increase-mongo-bootstrap-timeout/+merge/220745 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -1 line) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/jujud/bootstrap.go View 2 chunks +6 lines, -1 line 3 comments Download

Messages

Total messages: 4
wallyworld
Please take a look.
9 years, 11 months ago (2014-05-23 05:15:13 UTC) #1
axw
https://codereview.appspot.com/94700048/diff/1/cmd/jujud/bootstrap.go File cmd/jujud/bootstrap.go (right): https://codereview.appspot.com/94700048/diff/1/cmd/jujud/bootstrap.go#newcode145 cmd/jujud/bootstrap.go:145: state.DefaultDialOpts(), I think we also want a longer timeout ...
9 years, 11 months ago (2014-05-23 06:34:08 UTC) #2
wallyworld
https://codereview.appspot.com/94700048/diff/1/cmd/jujud/bootstrap.go File cmd/jujud/bootstrap.go (right): https://codereview.appspot.com/94700048/diff/1/cmd/jujud/bootstrap.go#newcode145 cmd/jujud/bootstrap.go:145: state.DefaultDialOpts(), On 2014/05/23 06:34:07, axw wrote: > I think ...
9 years, 11 months ago (2014-05-23 07:07:58 UTC) #3
axw
9 years, 11 months ago (2014-05-23 07:21:50 UTC) #4
LGTM

https://codereview.appspot.com/94700048/diff/1/cmd/jujud/bootstrap.go
File cmd/jujud/bootstrap.go (right):

https://codereview.appspot.com/94700048/diff/1/cmd/jujud/bootstrap.go#newcode145
cmd/jujud/bootstrap.go:145: state.DefaultDialOpts(),
On 2014/05/23 07:07:58, wallyworld wrote:
> On 2014/05/23 06:34:07, axw wrote:
> > I think we also want a longer timeout here, or maybe just a retry loop.
> 
> Not sure. By the time agent.InitializeState() is called, startMongo() with the
> longer timeout has already been called and a connection to mongo established.
So
> here I think it's ok to stick to the default timeout?

Well we have this issue in the tests; we connect, but then get i/o timeouts due
to the machine being under load, and mongo taking too long to respond. And in
fact, the socket timeout is hard-coded in state/open.go right now.

It's probably not likely to happen in reality, so leave it for now.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b