Merge lp://staging/~dave-cheney/juju-core/071-cmd-jujud-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/071-cmd-jujud-stater-I |
Merge into: | lp://staging/~juju/juju-core/trunk |
Prerequisite: | lp://staging/~dave-cheney/juju-core/069-worker-stater-I |
Diff against target: |
203 lines (+134/-13) (has conflicts) 5 files modified
cmd/jujud/main.go (+1/-0) cmd/jujud/stater.go (+29/-0) cmd/jujud/stater_test.go (+87/-0) environs/cloudinit/cloudinit.go (+16/-7) environs/cloudinit/cloudinit_test.go (+1/-6) Text conflict in environs/cloudinit/cloudinit.go |
To merge this branch: | bzr merge lp://staging/~dave-cheney/juju-core/071-cmd-jujud-stater-I |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
The Go Language Gophers | Pending | ||
Review via email: mp+143638@code.staging.launchpad.net |
Description of the change
cmd/jujud: introduce stater
Prereq: https:/
This proposal introduces a new jujud subcommand, stater. The stater command replaces the current shell scripting built into cloudinit.
In future proposals the stater will become a long lived command that is responsible for the configuration of the mongodb upstart job.
To post a comment you must log in.
Unmerged revisions
- 852. By Dave Cheney
-
merge conflict, nothing to see here
- 851. By Dave Cheney
-
merge from trunk and respond to review feedback
- 850. By Dave Cheney
-
stater tests
- 849. By Dave Cheney
-
fix tests
- 848. By Dave Cheney
-
merge from prereq
- 847. By Dave Cheney
-
remove double dd
- 846. By Dave Cheney
-
merge from prereq
- 845. By Dave Cheney
-
wip
- 844. By Dave Cheney
-
wip
- 843. By Dave Cheney
-
wip
https:/ /codereview. appspot. com/7149043/ diff/4001/ cmd/jujud/ main.go
File cmd/jujud/main.go (right):
https:/ /codereview. appspot. com/7149043/ diff/4001/ cmd/jujud/ main.go# newcode22 main.go: 22: jujud.Register( &StaterCommand{ })
cmd/jujud/
Either this needs a *stater.Config (-1), or the command itself needs to
set one up itself (+1); ISTM that it doesn't, and the tests poke all
that info in directly. Did I miss something?
https:/ /codereview. appspot. com/7149043/ diff/4001/ cmd/jujud/ stater. go
File cmd/jujud/stater.go (right):
https:/ /codereview. appspot. com/7149043/ diff/4001/ cmd/jujud/ stater. go#newcode12 stater. go:12: *stater.Config
cmd/jujud/
Why embed a (nil) pointer when you could just embed directly...
https:/ /codereview. appspot. com/7149043/ diff/4001/ cmd/jujud/ stater. go#newcode22 stater. go:22: }
cmd/jujud/
...initialize the fields here...
https:/ /codereview. appspot. com/7149043/ diff/4001/ cmd/jujud/ stater. go#newcode27 stater. go:27: sr := stater. NewStater( s.Config)
cmd/jujud/
...and pass &s.Config here?
https:/ /codereview. appspot. com/7149043/ diff/4001/ cmd/jujud/ stater_ test.go stater_ test.go (left):
File cmd/jujud/
https:/ /codereview. appspot. com/7149043/ diff/4001/ cmd/jujud/ stater_ test.go# oldcode16 stater_ test.go: 16: ctx := &cmd.Context{
cmd/jujud/
There are a lot of these scattered through the codebase, but maybe it's
not worth factoring them into one place. Thoughts?
https:/ /codereview. appspot. com/7149043/ diff/4001/ environs/ cloudinit/ cloudinit. go cloudinit/ cloudinit. go (left):
File environs/
https:/ /codereview. appspot. com/7149043/ diff/4001/ environs/ cloudinit/ cloudinit. go#oldcode135 cloudinit/ cloudinit. go:135: if err := addMongoToBoot(c, cfg);
environs/
err != nil {
I don't think this change is justified yet -- we don't pass any of the
necessary information in. (Does this actually run correctly? I don't see
how it can...)
https:/ /codereview. appspot. com/7149043/