https://codereview.appspot.com/80230043/diff/20001/state/apiserver/provisioner/provisioner.go#newcode249
state/apiserver/provisioner/provisioner.go:249: if transient, ok :=
result.Data["transient"]; !ok || !transient.(bool) {
On 2014/03/26 04:57:01, axw wrote:
> There's a potential type assertion panic here, if something sets
transient to
> something other than a bool. Not sure if we want to be bothered
working around
> that.
I thought about it but forgot. Fixed.
https://codereview.appspot.com/80230043/diff/20001/state/apiserver/provisioner/provisioner.go#newcode254
state/apiserver/provisioner/provisioner.go:254: if err == nil {
On 2014/03/26 04:57:01, axw wrote:
> It doesn't seem right to me that MachinesWithTransientErrors should be
returning
> errors for individual machines. Machine that are inaccessible simply
shouldn't
> show up, I think. The caller isn't asking about them specifically.
Hmmmm. I think that's a valid point. I've changed it.
Please take a look.
https:/ /codereview. appspot. com/80230043/ diff/20001/ state/api/ provisioner/ provisioner_ test.go provisioner/ provisioner_ test.go (right):
File state/api/
https:/ /codereview. appspot. com/80230043/ diff/20001/ state/api/ provisioner/ provisioner_ test.go# newcode139 provisioner/ provisioner_ test.go: 139: c.Assert( info[0] .Error,
state/api/
gc.ErrorMatches, "permission denied")
On 2014/03/26 04:57:01, axw wrote:
> This seems like a weird situation to be in. If there's a machine that
the caller
> is not allowed to read, I think it should just be excluded.
Done.
https:/ /codereview. appspot. com/80230043/ diff/20001/ state/apiserver /provisioner/ provisioner. go /provisioner/ provisioner. go (right):
File state/apiserver
https:/ /codereview. appspot. com/80230043/ diff/20001/ state/apiserver /provisioner/ provisioner. go#newcode244 /provisioner/ provisioner. go:244: if canAccess && err ==
state/apiserver
nil {
On 2014/03/26 04:57:01, axw wrote:
> err == nil implies canAccess (otherwise it'd be ErrPerm), so just "if
err ==
> nil"
Done.
https:/ /codereview. appspot. com/80230043/ diff/20001/ state/apiserver /provisioner/ provisioner. go#newcode249 /provisioner/ provisioner. go:249: if transient, ok := Data["transient "]; !ok || !transient.(bool) {
state/apiserver
result.
On 2014/03/26 04:57:01, axw wrote:
> There's a potential type assertion panic here, if something sets
transient to
> something other than a bool. Not sure if we want to be bothered
working around
> that.
I thought about it but forgot. Fixed.
https:/ /codereview. appspot. com/80230043/ diff/20001/ state/apiserver /provisioner/ provisioner. go#newcode254 /provisioner/ provisioner. go:254: if err == nil { nsientErrors should be
state/apiserver
On 2014/03/26 04:57:01, axw wrote:
> It doesn't seem right to me that MachinesWithTra
returning
> errors for individual machines. Machine that are inaccessible simply
shouldn't
> show up, I think. The caller isn't asking about them specifically.
Hmmmm. I think that's a valid point. I've changed it.
https:/ /codereview. appspot. com/80230043/