Merge lp:~dave-cheney/juju-core/089-state-unit-assigned-machine into lp:~juju/juju-core/trunk
Status: | Rejected |
---|---|
Rejected by: | Gustavo Niemeyer |
Proposed branch: | lp:~dave-cheney/juju-core/089-state-unit-assigned-machine |
Merge into: | lp:~juju/juju-core/trunk |
Diff against target: |
247 lines (+38/-42) 8 files modified
cmd/juju/status.go (+2/-2) cmd/jujud/provisioning_test.go (+1/-3) juju/deploy_test.go (+5/-5) state/assign_test.go (+18/-18) state/service_test.go (+2/-2) state/unit.go (+6/-6) worker/firewaller/firewaller.go (+3/-3) worker/firewaller/firewaller_test.go (+1/-3) |
To merge this branch: | bzr merge lp:~dave-cheney/juju-core/089-state-unit-assigned-machine |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
The Go Language Gophers | Pending | ||
Review via email: mp+122617@code.launchpad.net |
Description of the change
state: unit: AssignedMachine returns a machine
This proposal alters AssignedMachine (and it's signature) to return a
*state.Machine rather than an id. All the non test consumers of this
method are actually after a *Machine, not the id anyway, so this saves them
the call to state.Machine(). The test code was altered for the new signature
but is operation is unaffected.
Unmerged revisions
- 457. By Dave Cheney
-
AssignedMachine
- 456. By Roger Peppe
-
juju: always connect to State.
All uses of juju.Conn other than Bootstrap and Destroy require a state
connection, so make State an exported field of Conn and connect to it
when creating the Conn.The few places that call Bootstrap can easily call Environ.Bootstrap
instead.Also add environs.
NewFromName to make it easier to open an
environment, rename juju.NewConn to juju.NewConnFromName, and add
juju.NewConnFromEnviron to join the dots. R=TheMue, niemeyer
CC=
https://codereview. appspot. com/6488077 - 455. By Roger Peppe
-
worker: new package to factor out some common code from workers
Also simplify workers a little.
R=niemeyer
CC=
https://codereview. appspot. com/6501072 - 454. By Roger Peppe
-
cmd/jujud: fix race in test
We should not call OpenPort until the new instance id has
hit the state.We also fix a bug in firewaller where it called InstanceId even
when it needed to do nothing, and take the opportunity
to make the firewaller tests a little more concise now that we
have JujuConnSuite.R=TheMue, dfc
CC=
https://codereview. appspot. com/6499056 - 453. By Roger Peppe
-
environs: add BootstrapConfig
Also add flags to environs.FindTools and environs.BestTools,
LoggingSuite to JujuSuite, and make the Config in cloudinit
a *config.Config.R=niemeyer, dfc
CC=
https://codereview. appspot. com/6500052 - 452. By Frank Mueller
-
state: changed environ config to be config.Config
state.EnvironCo
nfig() and the according watcher now
return environs/config. Config. Additionally the new
function state.SetEnvironConfig( ) replaces the current
configuration. Depending code - mostly tests - has
been changed.R=niemeyer
CC=
https://codereview. appspot. com/6493055 - 451. By William Reade
-
add charm.GitDir
Hopefully uncontroversial; implementing this should help me focus on the
actual charm.Manager implementation more easily.R=niemeyer
CC=
https://codereview. appspot. com/6493059 - 450. By Roger Peppe
-
environs/config: add support for agent version.
Also adjust documentation for schema.Omit slightly
and add a test.R=niemeyer
CC=
https://codereview. appspot. com/6499055 - 449. By Roger Peppe
-
environs: change BestTools so it does not choose later versions
As discussed on-line, when upgrading we want to
choose the latest version with number <= the proposed
version.R=niemeyer
CC=
https://codereview. appspot. com/6495054 - 448. By Dave Cheney
-
environs/dummy: fix build
I thought I ran tests before submitting, but clearly I did not.
The CL change doesn't seem to reflect the CL description.
https:/ /codereview. appspot. com/6499071/ diff/1/ cmd/juju/ status. go
File cmd/juju/status.go (right):
https:/ /codereview. appspot. com/6499071/ diff/1/ cmd/juju/ status. go#newcode212 status. go:212: if m, err := unit.AssignedMa chine() ; err == nil
cmd/juju/
{
This seems to contradict the CL description. We used to have a machine
id, and now we will fetch a machine value from the database once more
for every single unit we have.
https:/ /codereview. appspot. com/6499071/ diff/1/ worker/ firewaller/ firewaller. go firewaller/ firewaller. go (right):
File worker/
https:/ /codereview. appspot. com/6499071/ diff/1/ worker/ firewaller/ firewaller. go#newcode113 firewaller/ firewaller. go:113: if fw.machineds[ machine. Id()] ==
worker/
nil {
Once again, real code that cares only about the id is now fetching the
machine just to pick its id.
https:/ /codereview. appspot. com/6499071/