Merge lp:~dave-cheney/juju-core/go-cmd-jujud-provisioner-unknown-machines into lp:~juju/juju-core/trunk
Proposed by
Dave Cheney
Status: | Merged |
---|---|
Merge reported by: | Gustavo Niemeyer |
Merged at revision: | not available |
Proposed branch: | lp:~dave-cheney/juju-core/go-cmd-jujud-provisioner-unknown-machines |
Merge into: | lp:~juju/juju-core/trunk |
Diff against target: |
222 lines (+132/-15) 2 files modified
cmd/jujud/provisioning.go (+56/-15) cmd/jujud/provisioning_test.go (+76/-0) |
To merge this branch: | bzr merge lp:~dave-cheney/juju-core/go-cmd-jujud-provisioner-unknown-machines |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
The Go Language Gophers | Pending | ||
Review via email: mp+110777@code.launchpad.net |
Description of the change
cmd/jujud: provisioner shuts down unknown instance
This proposal adds the facility for the PA to detect lost or
unknown instances running in the environment that are not
associated with a machine in the state and shut them down.
To post a comment you must log in.
LGTM, with a couple of minors.
https:/ /codereview. appspot. com/6315043/ diff/6001/ cmd/jujud/ provisioning. go provisioning. go (right):
File cmd/jujud/
https:/ /codereview. appspot. com/6315043/ diff/6001/ cmd/jujud/ provisioning. go#newcode110 provisioning. go:110: p.tomb.Kill(err)
cmd/jujud/
return?
https:/ /codereview. appspot. com/6315043/ diff/6001/ cmd/jujud/ provisioning. go#newcode197 provisioning. go:197: machines, err := p.st.AllMachines()
cmd/jujud/
These All* methods aren't a great API. We can do that for now, but we'll
need something better soon. Think about 100k machines running. This is
fetching 200k items from the DB regularly, without much benefit in most
cases.
Can you please add a note here and file a bug in Launchpad against
juju-core?
https:/ /codereview. appspot. com/6315043/ diff/6001/ cmd/jujud/ provisioning. go#newcode206 provisioning. go:206: if id == "" {
cmd/jujud/
Please add the same TODO we have elsewhere. InstanceId should really not
be returning an empty id.
https:/ /codereview. appspot. com/6315043/ diff/6001/ cmd/jujud/ provisioning_ test.go provisioning_ test.go (right):
File cmd/jujud/
https:/ /codereview. appspot. com/6315043/ diff/6001/ cmd/jujud/ provisioning_ test.go# newcode392 provisioning_ test.go: 392: // where the final machine has been
cmd/jujud/
removed from the state which the PA was
"removed from the state which the PA was down"?
https:/ /codereview. appspot. com/6315043/