|
Migrate juju destroy-environment to use API
This change introduces a new client API
method, DestroyJuju. This method does the
following, server-side, in order:
- marks the environment as Dying, preventing
the addition of machines and services to
state
- ensures there are no non-manager manually-
provisioned machines in state
- marks all services as Dying, thus prevening
units from being added
- stops all non-manager machine instances
- marks the environment as Dead
Machine agents watch, via the machiner API, for
changes to the environment's lifecycle, and
terminate themselves when the environment
becomes Dead. This is how we terminate manual
bootstrap nodes.
A followup will update agent termination logic
to uninstall mongo on state servers, and also
remove the data-dir/log-dir.
Fixes #1218688
Fixes #1246343
https://code.launchpad.net/~axwalk/juju-core/lp1246983-cli-api-removeagents/+merge/194801
(do not edit description out of merge proposal)
Total comments: 9
Total comments: 24
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+566 lines, -49 lines) |
Patch |
 |
A |
[revision details]
|
View
|
1
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/destroyenvironment.go
|
View
|
1
|
2 chunks |
+12 lines, -4 lines |
0 comments
|
Download
|
 |
M |
cmd/jujud/machine.go
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
environs/manual/provisioner.go
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
provider/dummy/environs.go
|
View
|
1
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
provider/null/environ.go
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
state/api/client.go
|
View
|
1
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
A |
state/api/machiner/environ.go
|
View
|
|
1 chunk |
+41 lines, -0 lines |
2 comments
|
Download
|
 |
M |
state/api/machiner/machine.go
|
View
|
|
3 chunks |
+2 lines, -20 lines |
0 comments
|
Download
|
 |
M |
state/api/machiner/machiner.go
|
View
|
1
|
4 chunks |
+39 lines, -3 lines |
2 comments
|
Download
|
 |
M |
state/api/params/internal.go
|
View
|
1
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
A |
state/apiserver/client/destroyjuju.go
|
View
|
1
|
1 chunk |
+126 lines, -0 lines |
4 comments
|
Download
|
 |
A |
state/apiserver/client/destroyjuju_test.go
|
View
|
1
|
1 chunk |
+118 lines, -0 lines |
0 comments
|
Download
|
 |
M |
state/apiserver/machine/machiner.go
|
View
|
1
|
2 chunks |
+31 lines, -3 lines |
2 comments
|
Download
|
 |
M |
state/environ.go
|
View
|
|
3 chunks |
+64 lines, -12 lines |
6 comments
|
Download
|
 |
M |
state/interface.go
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
state/state.go
|
View
|
1
|
5 chunks |
+23 lines, -2 lines |
2 comments
|
Download
|
 |
M |
state/state_test.go
|
View
|
1
|
2 chunks |
+36 lines, -0 lines |
4 comments
|
Download
|
 |
M |
state/watcher.go
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
worker/machiner/machiner.go
|
View
|
1
|
2 chunks |
+46 lines, -2 lines |
2 comments
|
Download
|
Total messages: 6
|