Merge lp://staging/~dave-cheney/juju-core/069-worker-stater-I into lp://staging/~juju/juju-core/trunk
Proposed by
Dave Cheney
Status: | Work in progress |
---|---|
Proposed branch: | lp://staging/~dave-cheney/juju-core/069-worker-stater-I |
Merge into: | lp://staging/~juju/juju-core/trunk |
Diff against target: |
461 lines (+433/-0) 5 files modified
worker/stater/config_test.go (+61/-0) worker/stater/stater.go (+218/-0) worker/stater/stater_test.go (+108/-0) worker/stater/tools.go (+23/-0) worker/stater/tools_test.go (+23/-0) |
To merge this branch: | bzr merge lp://staging/~dave-cheney/juju-core/069-worker-stater-I |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
The Go Language Gophers | Pending | ||
Review via email: mp+143629@code.staging.launchpad.net |
Description of the change
worker/stater: new package
This proposal introduces a new jujud worker, a Stater. The roll of the Stater is to handle installing and configuring a state server (read mongodb). In this initial implementation the Stater is capable of replacing the bash scripting in environs/
To post a comment you must log in.
Unmerged revisions
- 852. By Dave Cheney
-
responding to review feedback
- 851. By Dave Cheney
-
merge from trunk
- 850. By Dave Cheney
-
responding to review feedback
- 849. By Dave Cheney
-
responding to review feedback
- 848. By Dave Cheney
-
responding to review feedback
- 847. By Dave Cheney
-
removed
- 846. By Dave Cheney
-
test stater in stater_test
- 845. By Dave Cheney
-
fix default journal size
- 844. By Dave Cheney
-
added logging
- 843. By Dave Cheney
-
wip
A few comments; the large-scale concern is that I'm not sure we benefit
by making this a worker; I don't think that really fits the context in
which it will be used.
https:/ /codereview. appspot. com/7134051/ diff/8001/ worker/ stater/ export_ test.go stater/ export_ test.go (right):
File worker/
https:/ /codereview. appspot. com/7134051/ diff/8001/ worker/ stater/ export_ test.go# newcode16 stater/ export_ test.go: 16: func (c *Config) MongoDataDirX() string
worker/
{ return c.mongoDataDir() }
This all feels a bit awkward.
https:/ /codereview. appspot. com/7134051/ diff/8001/ worker/ stater/ stater. go stater/ stater. go (right):
File worker/
https:/ /codereview. appspot. com/7134051/ diff/8001/ worker/ stater/ stater. go#newcode22 stater/ stater. go:22: // unpacked too
worker/
s/too/to/
https:/ /codereview. appspot. com/7134051/ diff/8001/ worker/ stater/ stater. go#newcode42 stater/ stater. go:42: // a mongodb state server on any machine
worker/
that it is started on.
I think it should probably install an upstart conf for mongo too. Sane?
https:/ /codereview. appspot. com/7134051/ diff/8001/ worker/ stater/ stater_ test.go stater/ stater_ test.go (right):
File worker/
https:/ /codereview. appspot. com/7134051/ diff/8001/ worker/ stater/ stater_ test.go# newcode25 stater/ stater_ test.go: 25: nsport. (*http. Transport) .RegisterProtoc ol("file" , nsport( http.Dir( "testdata" )))
worker/
http.DefaultTra
http.NewFileTra
Nice.
https:/ /codereview. appspot. com/7134051/ diff/8001/ worker/ stater/ stater_ test.go# newcode108 stater/ stater_ test.go: 108: c.Assert(err, IsNil)
worker/
It feels to me as though you could probably just checkJournal and
checkContents here, and lose (1) all the other tests in this file and
(2) all those export_test bits.
I can see the sanity behind splitting the Stater's methods up as they
are, but I'm not sure that we gain a great deal by testing them
independently.
https:/ /codereview. appspot. com/7134051/