Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3721)

Issue 14254043: provider/common: Destroy, and tests

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 6 months ago by fwereade
Modified:
10 years, 6 months ago
Reviewers:
axw1, mp+188750
Visibility:
Public.

Description

provider/common: Destroy, and tests Added a common implementation of Destroy, and tests for Bootstrap which had somehow never been written. Also drive-by removed the machineId arg from consideration when bootstrapping, because, WTF... a non-0 bootstrap machine would break *everything*. https://code.launchpad.net/~fwereade/juju-core/provider-common-destroy/+merge/188750 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+427 lines, -96 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M environs/bootstrap/bootstrap.go View 2 chunks +1 line, -4 lines 0 comments Download
M environs/bootstrap/bootstrap_test.go View 1 chunk +1 line, -1 line 0 comments Download
M environs/cloudinit.go View 1 chunk +3 lines, -3 lines 0 comments Download
M environs/interface.go View 1 chunk +1 line, -1 line 0 comments Download
M environs/manual/agent.go View 1 chunk +1 line, -1 line 0 comments Download
M environs/manual/bootstrap.go View 4 chunks +0 lines, -6 lines 0 comments Download
M environs/manual/bootstrap_test.go View 2 chunks +0 lines, -16 lines 0 comments Download
M provider/azure/environ.go View 2 chunks +2 lines, -2 lines 0 comments Download
M provider/common/bootstrap.go View 3 chunks +3 lines, -3 lines 0 comments Download
A provider/common/bootstrap_test.go View 1 chunk +160 lines, -0 lines 0 comments Download
A provider/common/destroy.go View 1 chunk +26 lines, -0 lines 3 comments Download
A provider/common/destroy_test.go View 1 chunk +125 lines, -0 lines 0 comments Download
A provider/common/mock_test.go View 1 chunk +79 lines, -0 lines 0 comments Download
M provider/common/state_test.go View 5 chunks +11 lines, -8 lines 0 comments Download
M provider/dummy/environs.go View 1 chunk +1 line, -1 line 0 comments Download
M provider/ec2/ec2.go View 2 chunks +3 lines, -17 lines 0 comments Download
M provider/local/environ.go View 1 chunk +1 line, -1 line 0 comments Download
M provider/maas/environ.go View 2 chunks +3 lines, -13 lines 0 comments Download
M provider/null/environ.go View 1 chunk +1 line, -2 lines 0 comments Download
M provider/openstack/provider.go View 3 chunks +3 lines, -17 lines 0 comments Download

Messages

Total messages: 4
fwereade
Please take a look.
10 years, 6 months ago (2013-10-02 00:50:26 UTC) #1
axw1
LGTM modulo below concern. Let me know what you think. https://codereview.appspot.com/14254043/diff/1/provider/common/destroy.go File provider/common/destroy.go (right): https://codereview.appspot.com/14254043/diff/1/provider/common/destroy.go#newcode21 ...
10 years, 6 months ago (2013-10-02 08:38:59 UTC) #2
fwereade
https://codereview.appspot.com/14254043/diff/1/provider/common/destroy.go File provider/common/destroy.go (right): https://codereview.appspot.com/14254043/diff/1/provider/common/destroy.go#newcode21 provider/common/destroy.go:21: fallthrough On 2013/10/02 08:38:59, axw1 wrote: > Hrm, so ...
10 years, 6 months ago (2013-10-02 10:15:16 UTC) #3
axw1
10 years, 6 months ago (2013-10-02 10:42:01 UTC) #4
https://codereview.appspot.com/14254043/diff/1/provider/common/destroy.go
File provider/common/destroy.go (right):

https://codereview.appspot.com/14254043/diff/1/provider/common/destroy.go#new...
provider/common/destroy.go:21: fallthrough
On 2013/10/02 10:15:16, fwereade wrote:
> On 2013/10/02 08:38:59, axw1 wrote:
> > Hrm, so we'll clean up the bootstrap-state file even if we fail to stop some
> > instances now. This is a departure from ec2.
> > 
> > Is this really desirable? It could be easy to miss that error log message,
and
> > not notice that you've left some instances running. Particularly if you ran
> > destroy-environment from a script.
> 
> If StopInstances fails, we return the error and leave the storage alone...
don't
> we? TestCannotStopInstances doesn't configure storage, so it'll panic if we
hit
> it, I think.

Yep, I'm an idiot. Forget that you ever saw this ;)
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b