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

Issue 41280043: Implement DestroyEnvironment API

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

Description

Implement DestroyEnvironment API We introduce a new DestroyEnvironment client API method, which: - checks that there are no manual non-manager machines in state - sets the environment to Dying, scheduling cleanups for services and preventing addition of new services and machines. - destroys non-manager instances "juju destroy-environment" will call this new method, ignoring the "no such method" error returned by old API servers. If the API method succeeds, or it doesn't exist, the provider.Destroy() method is called. https://code.launchpad.net/~axwalk/juju-core/destroy-environment-api/+merge/198698 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 6

Patch Set 2 : Implement DestroyEnvironment API #

Patch Set 3 : Implement DestroyEnvironment API #

Unified diffs Side-by-side diffs Delta from patch set Stats (+536 lines, -133 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/addmachine.go View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M cmd/juju/cmd_test.go View 3 chunks +0 lines, -126 lines 0 comments Download
M cmd/juju/destroyenvironment.go View 1 2 4 chunks +19 lines, -5 lines 0 comments Download
A cmd/juju/destroyenvironment_test.go View 1 chunk +160 lines, -0 lines 0 comments Download
M provider/dummy/environs.go View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M state/api/client.go View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
A state/apiserver/client/destroy.go View 1 1 chunk +153 lines, -0 lines 0 comments Download
A state/apiserver/client/destroy_test.go View 1 1 chunk +123 lines, -0 lines 0 comments Download
M state/machine.go View 1 1 chunk +20 lines, -0 lines 0 comments Download
M state/machine_test.go View 1 2 1 chunk +43 lines, -0 lines 0 comments Download

Messages

Total messages: 6
axw
Please take a look.
10 years, 4 months ago (2013-12-12 10:07:38 UTC) #1
fwereade
LGTM with more-eager instance-killing, or a good reason not to, plus the other trivials below ...
10 years, 4 months ago (2013-12-18 12:52:20 UTC) #2
axw
Please take a look. https://codereview.appspot.com/41280043/diff/1/state/apiserver/client/destroy.go File state/apiserver/client/destroy.go (right): https://codereview.appspot.com/41280043/diff/1/state/apiserver/client/destroy.go#newcode54 state/apiserver/client/destroy.go:54: if err := checkManualMachines(machines); err ...
10 years, 4 months ago (2013-12-19 05:16:42 UTC) #3
axw
Please take a look.
10 years, 4 months ago (2013-12-19 14:25:38 UTC) #4
axw
On 2013/12/19 14:25:38, axw wrote: > Please take a look. FYI, I added a --force ...
10 years, 4 months ago (2013-12-19 14:34:00 UTC) #5
axw
10 years, 4 months ago (2013-12-19 14:34:00 UTC) #6
On 2013/12/19 14:25:38, axw wrote:
> Please take a look.

FYI, I added a --force flag to destroy-environment which skips the API call.
This is necessary for destroying broken environments, where the API server is
inaccessible or otherwise broken. There's also a drive-by fix to add-machine,
which was returning spurious errors due to nil interface assignment.
Sign in to reply to this message.

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