Looking very nice; just a few questions, and a suggestion that you
consider moving the local storage worker into the top-level worker
package, rather than hiding it away under local.
https://codereview.appspot.com/13635044/diff/4001/environs/filestorage/filestorage.go#newcode114
environs/filestorage/filestorage.go:114: _, err = io.CopyN(file, r,
length)
As suggested in the previous review, please copy the whole lot somewhere
out of the way and move atomically into place on success; in this case I
think we've definitely vulnerable to errors with longer-term
consequences.
Looking very nice; just a few questions, and a suggestion that you
consider moving the local storage worker into the top-level worker
package, rather than hiding it away under local.
https:/ /codereview. appspot. com/13635044/ diff/4001/ cmd/juju/ bootstrap. go bootstrap. go (right):
File cmd/juju/
https:/ /codereview. appspot. com/13635044/ diff/4001/ cmd/juju/ bootstrap. go#newcode71 bootstrap. go:71: if bs, ok := (bootstrap. BootstrapStorag e); ok { rager)" ? Elsewhere, we're
cmd/juju/
environ.
Would that maybe be ".(BootstrapSto
experimenting with things like:
type HasBootstrapStorage interface { torage( ) (Storage, error)
BootstrapS
}
...which IMO leads at least to more-readable casts. YMMV.
https:/ /codereview. appspot. com/13635044/ diff/4001/ environs/ filestorage/ filestorage. go filestorage/ filestorage. go (right):
File environs/
https:/ /codereview. appspot. com/13635044/ diff/4001/ environs/ filestorage/ filestorage. go#newcode114 filestorage/ filestorage. go:114: _, err = io.CopyN(file, r,
environs/
length)
As suggested in the previous review, please copy the whole lot somewhere
out of the way and move atomically into place on success; in this case I
think we've definitely vulnerable to errors with longer-term
consequences.
https:/ /codereview. appspot. com/13635044/ diff/4001/ environs/ manual/ bootstrap. go manual/ bootstrap. go (right):
File environs/
https:/ /codereview. appspot. com/13635044/ diff/4001/ environs/ manual/ bootstrap. go#newcode143 manual/ bootstrap. go:143: }
environs/
This is really nice; can we produce some output while we're doing so? I
guess it'll have to be straight to the log for now, but a few INFO
messages would be helpful.
https:/ /codereview. appspot. com/13635044/ diff/4001/ environs/ manual/ bootstrap. go#newcode146 manual/ bootstrap. go:146: // get the *state.Machine?
environs/
Don't think so...
https:/ /codereview. appspot. com/13635044/ diff/4001/ environs/ manual/ bootstrap_ test.go manual/ bootstrap_ test.go (right):
File environs/
https:/ /codereview. appspot. com/13635044/ diff/4001/ environs/ manual/ bootstrap_ test.go# newcode153 manual/ bootstrap_ test.go: 153: c.Assert( Bootstrap( args),
environs/
gc.ErrorMatches, "Environ argument is nil")
FWIW, I'm kinda ok with panics for unexpected nils.
https:/ /codereview. appspot. com/13635044/ diff/4001/ environs/ manual/ bootstrap_ test.go# newcode172 manual/ bootstrap_ test.go: 172: args.MachineId = "1"
environs/
Eyebrow slightly raised here... I'm not sure that's actually valid. Do
we initialize the machine id counter in state such that all subsequent
numbers are higher?
https:/ /codereview. appspot. com/13635044/ diff/4001/ environs/ manual/ bootstrap_ test.go# newcode204 manual/ bootstrap_ test.go: 204: defer sshresponse(c, dScript, "", 0)()
environs/
checkProvisione
This code block is looking awfully familiar now. Can we tidy it up a
little?
https:/ /codereview. appspot. com/13635044/ diff/4001/ environs/ manual/ tools.go manual/ tools.go (right):
File environs/
https:/ /codereview. appspot. com/13635044/ diff/4001/ environs/ manual/ tools.go# newcode23 manual/ tools.go: 23: arches := possibleTools. Arches( )
environs/
Why would we be getting multiple arches out of FindInstanceTools? Aren't
we passing one in?
https:/ /codereview. appspot. com/13635044/