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

Issue 72500043: MachineAgent using EnsureMongoServer

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 1 month ago by natefinch
Modified:
10 years ago
Reviewers:
wwitzel3, jameinel, axw, mp+209954, rog
Visibility:
Public.

Description

MachineAgent using EnsureMongoServer https://code.launchpad.net/~natefinch/juju-core/030-MA-HA/+merge/209954 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : MachineAgent using EnsureMongoServer #

Patch Set 3 : MachineAgent using EnsureMongoServer #

Total comments: 4

Patch Set 4 : MachineAgent using EnsureMongoServer #

Total comments: 31

Patch Set 5 : MachineAgent using EnsureMongoServer #

Total comments: 5

Patch Set 6 : MachineAgent using EnsureMongoServer #

Patch Set 7 : MachineAgent using EnsureMongoServer #

Total comments: 12

Patch Set 8 : MachineAgent using EnsureMongoServer #

Total comments: 8

Patch Set 9 : MachineAgent using EnsureMongoServer #

Total comments: 15

Patch Set 10 : MachineAgent using EnsureMongoServer #

Patch Set 11 : MachineAgent using EnsureMongoServer #

Patch Set 12 : MachineAgent using EnsureMongoServer #

Total comments: 6

Patch Set 13 : MachineAgent using EnsureMongoServer #

Unified diffs Side-by-side diffs Delta from patch set Stats (+511 lines, -292 lines) Patch
A [revision details] View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M agent/agent.go View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -1 line 0 comments Download
M agent/bootstrap.go View 1 2 3 4 5 6 3 chunks +6 lines, -4 lines 0 comments Download
M agent/bootstrap_test.go View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M agent/format-1.18_whitebox_test.go View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M agent/mongo/mongo.go View 1 2 3 4 5 6 7 8 9 10 10 chunks +85 lines, -47 lines 0 comments Download
M agent/mongo/mongo_test.go View 1 2 3 4 5 6 7 8 5 chunks +54 lines, -14 lines 0 comments Download
M cmd/jujud/agent_test.go View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -2 lines 0 comments Download
M cmd/jujud/bootstrap.go View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +39 lines, -0 lines 0 comments Download
M cmd/jujud/bootstrap_test.go View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +96 lines, -39 lines 0 comments Download
M cmd/jujud/machine.go View 1 2 3 4 5 6 7 8 9 10 8 chunks +92 lines, -43 lines 0 comments Download
M cmd/jujud/machine_test.go View 1 2 3 4 5 6 7 8 9 10 7 chunks +28 lines, -1 line 0 comments Download
M environs/cloudinit/cloudinit.go View 1 2 3 4 5 6 7 8 3 chunks +20 lines, -53 lines 0 comments Download
M environs/cloudinit/cloudinit_test.go View 1 2 3 4 5 6 7 8 6 chunks +3 lines, -51 lines 0 comments Download
M provider/common/state.go View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M provider/dummy/environs.go View 1 2 3 4 5 6 7 8 2 chunks +11 lines, -2 lines 0 comments Download
M provider/local/environ_test.go View 1 2 3 4 5 6 7 8 5 chunks +6 lines, -10 lines 0 comments Download
M replicaset/replicaset.go View 1 2 3 4 5 6 7 8 9 10 3 chunks +9 lines, -3 lines 0 comments Download
M state/open.go View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +34 lines, -14 lines 0 comments Download
M state/state.go View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M testing/mgo.go View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -5 lines 0 comments Download
M worker/instancepoller/updater.go View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -1 line 0 comments Download
M worker/instancepoller/worker_test.go View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 29
natefinch
Please take a look.
10 years, 1 month ago (2014-03-07 15:57:12 UTC) #1
natefinch
Please take a look.
10 years, 1 month ago (2014-03-07 16:11:52 UTC) #2
natefinch
Please take a look.
10 years, 1 month ago (2014-03-26 11:25:22 UTC) #3
natefinch
Please take a look.
10 years, 1 month ago (2014-03-26 20:53:52 UTC) #4
jameinel
A bunch of comments, hopefully it is constructive. I also see a bunch of stuff ...
10 years, 1 month ago (2014-03-27 18:17:49 UTC) #5
wwitzel3
https://codereview.appspot.com/72500043/diff/60001/environs/cloudinit/cloudinit.go File environs/cloudinit/cloudinit.go (right): https://codereview.appspot.com/72500043/diff/60001/environs/cloudinit/cloudinit.go#newcode362 environs/cloudinit/cloudinit.go:362: c.AddPackageFromTargetRelease("mongodb-server", "precise-updates/cloud-tools") On 2014/03/27 18:17:49, jameinel wrote: > I ...
10 years, 1 month ago (2014-03-27 19:54:24 UTC) #6
natefinch
Please take a look. https://codereview.appspot.com/72500043/diff/60001/agent/bootstrap.go File agent/bootstrap.go (right): https://codereview.appspot.com/72500043/diff/60001/agent/bootstrap.go#newcode59 agent/bootstrap.go:59: func (c *configInternal) StateInfo() *state.Info ...
10 years, 1 month ago (2014-03-27 21:04:37 UTC) #7
axw
Just some preliminary notes, I haven't looked too deeply. https://codereview.appspot.com/72500043/diff/60001/agent/mongo/mongo.go File agent/mongo/mongo.go (right): https://codereview.appspot.com/72500043/diff/60001/agent/mongo/mongo.go#newcode205 agent/mongo/mongo.go:205: ...
10 years, 1 month ago (2014-03-28 01:26:54 UTC) #8
natefinch
On 2014/03/28 01:26:54, axw wrote: > Just some preliminary notes, I haven't looked too deeply. ...
10 years ago (2014-04-03 15:21:06 UTC) #9
natefinch
Please take a look. https://codereview.appspot.com/72500043/diff/80001/cmd/jujud/bootstrap.go File cmd/jujud/bootstrap.go (right): https://codereview.appspot.com/72500043/diff/80001/cmd/jujud/bootstrap.go#newcode99 cmd/jujud/bootstrap.go:99: st, _, err := c.Conf.config.InitializeState( ...
10 years ago (2014-04-03 15:36:12 UTC) #10
natefinch
Please take a look.
10 years ago (2014-04-03 19:08:43 UTC) #11
rog
Getting there! Some comments and suggestions below. https://codereview.appspot.com/72500043/diff/40001/agent/agent.go File agent/agent.go (right): https://codereview.appspot.com/72500043/diff/40001/agent/agent.go#newcode508 agent/agent.go:508: copy(c2.caCert, c.caCert) ...
10 years ago (2014-04-03 19:50:01 UTC) #12
natefinch
Please take a look.
10 years ago (2014-04-03 21:01:01 UTC) #13
axw
https://codereview.appspot.com/72500043/diff/80001/cmd/jujud/bootstrap.go File cmd/jujud/bootstrap.go (right): https://codereview.appspot.com/72500043/diff/80001/cmd/jujud/bootstrap.go#newcode99 cmd/jujud/bootstrap.go:99: st, _, err := c.Conf.config.InitializeState( On 2014/04/03 15:36:13, nate.finch ...
10 years ago (2014-04-04 02:34:06 UTC) #14
axw
https://codereview.appspot.com/72500043/diff/140001/cmd/jujud/bootstrap.go File cmd/jujud/bootstrap.go (right): https://codereview.appspot.com/72500043/diff/140001/cmd/jujud/bootstrap.go#newcode153 cmd/jujud/bootstrap.go:153: if err := ensureMongoServer(agentConfig.DataDir(), envCfg.StatePort()); err != nil { ...
10 years ago (2014-04-04 07:51:24 UTC) #15
axw
On 2014/04/04 07:51:24, axw wrote: > https://codereview.appspot.com/72500043/diff/140001/cmd/jujud/bootstrap.go > File cmd/jujud/bootstrap.go (right): > > https://codereview.appspot.com/72500043/diff/140001/cmd/jujud/bootstrap.go#newcode153 > ...
10 years ago (2014-04-04 08:10:14 UTC) #16
axw
Sorry about the spam... last one (I hope). I managed to get local to bootstrap ...
10 years ago (2014-04-04 08:22:55 UTC) #17
wwitzel3
https://codereview.appspot.com/72500043/diff/140001/agent/agent.go File agent/agent.go (right): https://codereview.appspot.com/72500043/diff/140001/agent/agent.go#newcode103 agent/agent.go:103: // StateServer() bool d? https://codereview.appspot.com/72500043/diff/140001/agent/agent.go#newcode343 agent/agent.go:343: logger.Debugf("config:\n-------------\n%s\n-----------------\n", configData) d? ...
10 years ago (2014-04-04 15:07:51 UTC) #18
natefinch
Please take a look.
10 years ago (2014-04-08 15:05:59 UTC) #19
rog
LGTM modulo a bunch of trivials and assuming it passes against the local provider and ...
10 years ago (2014-04-08 15:39:52 UTC) #20
natefinch
Please take a look.
10 years ago (2014-04-08 19:23:45 UTC) #21
natefinch
Thanks for the review, Rog. All changes suggested were made.
10 years ago (2014-04-08 20:16:38 UTC) #22
natefinch
Please take a look.
10 years ago (2014-04-08 20:45:52 UTC) #23
natefinch
Please take a look.
10 years ago (2014-04-09 10:46:47 UTC) #24
rog
stil LGTM https://codereview.appspot.com/72500043/diff/220001/cmd/jujud/bootstrap_test.go File cmd/jujud/bootstrap_test.go (right): https://codereview.appspot.com/72500043/diff/220001/cmd/jujud/bootstrap_test.go#newcode438 cmd/jujud/bootstrap_test.go:438: maybePanic(err) sorry for not picking up on ...
10 years ago (2014-04-09 12:50:00 UTC) #25
rog
actually this does not LGTM without the following fix. https://codereview.appspot.com/72500043/diff/220001/cmd/jujud/bootstrap.go File cmd/jujud/bootstrap.go (right): https://codereview.appspot.com/72500043/diff/220001/cmd/jujud/bootstrap.go#newcode167 cmd/jujud/bootstrap.go:167: ...
10 years ago (2014-04-09 12:58:42 UTC) #26
rog
> memberHostPort := net.JoinHostPort(mongo.SelectPeer ignore this line > MemberHostPort: memberHostPort, s/memberHostPort/peerHostPort/
10 years ago (2014-04-09 12:59:41 UTC) #27
natefinch
Please take a look. https://codereview.appspot.com/72500043/diff/220001/cmd/jujud/bootstrap.go File cmd/jujud/bootstrap.go (right): https://codereview.appspot.com/72500043/diff/220001/cmd/jujud/bootstrap.go#newcode167 cmd/jujud/bootstrap.go:167: MemberHostPort: mongo.SelectPeerAddress(addrs), On 2014/04/09 12:58:43, ...
10 years ago (2014-04-09 15:43:39 UTC) #28
rog
10 years ago (2014-04-09 15:59:58 UTC) #29
On 2014/04/09 15:43:39, nate.finch wrote:
> Please take a look.
> 
> https://codereview.appspot.com/72500043/diff/220001/cmd/jujud/bootstrap.go
> File cmd/jujud/bootstrap.go (right):
> 
>
https://codereview.appspot.com/72500043/diff/220001/cmd/jujud/bootstrap.go#ne...
> cmd/jujud/bootstrap.go:167: MemberHostPort: mongo.SelectPeerAddress(addrs),
> On 2014/04/09 12:58:43, rog wrote:
> > This doesn't seem right - SelectPeerAddress will not return a host:port.
> > 
> > Have you actually tried this live?
> > 
> > I think you probably want:
> > 
> > peerAddr := mongo.SelectPeerAddress(addrs)
> > if peerAddr == "" {
> >     return fmt.Errorf("no appropriate peer address found in %q", addrs)
> > }
> > peerHostPort := net.JoinHostPort(peerAddr, fmt.Sprint(port))
> > memberHostPort := net.JoinHostPort(mongo.SelectPeer
> > 
> > ...
> >     MemberHostPort: memberHostPort,
> 
> Done.
> 
>
https://codereview.appspot.com/72500043/diff/220001/cmd/jujud/bootstrap_test.go
> File cmd/jujud/bootstrap_test.go (right):
> 
>
https://codereview.appspot.com/72500043/diff/220001/cmd/jujud/bootstrap_test....
> cmd/jujud/bootstrap_test.go:438: maybePanic(err)
> On 2014/04/09 12:50:01, rog wrote:
> > sorry for not picking up on this earlier, but why aren't these maybePanics
> just
> > c.Assert(err, gc.IsNil)s ?
> > 
> 
> Done.
> 
> https://codereview.appspot.com/72500043/diff/220001/state/open.go
> File state/open.go (right):
> 
> https://codereview.appspot.com/72500043/diff/220001/state/open.go#newcode249
> state/open.go:249: logger.Debugf("starting newState")
> On 2014/04/09 12:50:01, rog wrote:
> > this should go i think, as suggested - it's not that significant, is it?
> 
> Done.

LGTM
Sign in to reply to this message.

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