|
|
|
Generate/set state serving info
The bootstrap-state invocation of jujud is
modified to generate a shared secret for the
Mongo replicaset. This is stored in:
$(datadir)/shared-secret.
During state initialisation, state serving
info (including the shared secret) is stored
in state.
https://code.launchpad.net/~axwalk/juju-core/jujud-bootstrap-mongo-sharedsecret/+merge/213610
(do not edit description out of merge proposal)
Patch Set 1 #
Total comments: 4
Patch Set 2 : Generate/set state serving info #
Total messages: 3
|
axw
Please take a look.
|
11 years, 9 months ago (2014年04月01日 08:28:00 UTC) #1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Please take a look.
LGTM, thanks! https://codereview.appspot.com/83050045/diff/1/agent/bootstrap.go File agent/bootstrap.go (right): https://codereview.appspot.com/83050045/diff/1/agent/bootstrap.go#newcode80 agent/bootstrap.go:80: st.Close() For consideration: there are perhaps enough Close calls here to warrant a defer func() { if err != nil { st.Close() } }() earlier. https://codereview.appspot.com/83050045/diff/1/agent/mongo/mongo.go File agent/mongo/mongo.go (right): https://codereview.appspot.com/83050045/diff/1/agent/mongo/mongo.go#newcode53 agent/mongo/mongo.go:53: return "", err s/err/fmt.Errorf("cannot read random secret: %v", err)/ ?
Please take a look. https://codereview.appspot.com/83050045/diff/1/agent/bootstrap.go File agent/bootstrap.go (right): https://codereview.appspot.com/83050045/diff/1/agent/bootstrap.go#newcode80 agent/bootstrap.go:80: st.Close() On 2014年04月01日 08:46:51, rog wrote: > For consideration: there are perhaps enough Close calls here to warrant a > > defer func() { > if err != nil { > st.Close() > } > }() > > earlier. Done. https://codereview.appspot.com/83050045/diff/1/agent/mongo/mongo.go File agent/mongo/mongo.go (right): https://codereview.appspot.com/83050045/diff/1/agent/mongo/mongo.go#newcode53 agent/mongo/mongo.go:53: return "", err On 2014年04月01日 08:46:51, rog wrote: > s/err/fmt.Errorf("cannot read random secret: %v", err)/ > ? Done.