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

Issue 12831043: Update add-machine for manual provisioning (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by axw
Modified:
10 years, 7 months ago
Reviewers:
thumper, axw1, mp+179840, fwereade
Visibility:
Public.

Description

Update add-machine for manual provisioning juju add-machine is updated to use a new package, environs/manual, to manually provision tools and a machine agent to an existing machine. When a manually provisioned machine is destroyed via juju destroy-machine, the machine agent will detect its termination and remove its upstart configuration file. There is currently no cleanup of the data or log directories; this will be done in a follow-up pending discussion. When the machine goes to Dead, a provisioner will remove the machine from state just like any other machine. TODO: destroy-environment will currently leak manually provisioned machines. A follow-up will address this by requiring users to individually destroy-machine before destroy-environment will proceed. Alternatively (or perhaps additionally), destroy-environment may take a flag to automatically do this. https://code.launchpad.net/~axwalk/juju-core/juju-add-machine/+merge/179840 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 14

Patch Set 2 : Update add-machine for manual provisioning #

Patch Set 3 : Update add-machine for manual provisioning #

Patch Set 4 : Update add-machine for manual provisioning #

Total comments: 64

Patch Set 5 : Update add-machine for manual provisioning #

Patch Set 6 : Update add-machine for manual provisioning #

Total comments: 23

Patch Set 7 : Update add-machine for manual provisioning #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+841 lines, -28 lines) Patch
A [revision details] View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M cloudinit/cloudinit_test.go View 1 2 3 4 1 chunk +19 lines, -0 lines 0 comments Download
M cloudinit/options.go View 1 2 3 4 1 chunk +31 lines, -2 lines 0 comments Download
M cmd/juju/addmachine.go View 1 2 3 4 5 6 5 chunks +34 lines, -9 lines 1 comment Download
M cmd/juju/destroyenvironment.go View 1 2 3 1 chunk +3 lines, -0 lines 1 comment Download
M cmd/jujud/machine.go View 1 2 3 4 3 chunks +15 lines, -1 line 0 comments Download
A environs/manual/agent.go View 1 2 3 4 5 6 1 chunk +133 lines, -0 lines 0 comments Download
A environs/manual/detection.go View 1 2 3 4 1 chunk +118 lines, -0 lines 0 comments Download
A environs/manual/detection_test.go View 1 2 3 4 5 6 1 chunk +141 lines, -0 lines 0 comments Download
A environs/manual/provisioner.go View 1 2 3 4 5 6 1 chunk +184 lines, -0 lines 1 comment Download
A environs/manual/provisioner_test.go View 1 2 3 4 5 6 1 chunk +85 lines, -0 lines 0 comments Download
A environs/manual/suite_test.go View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
M environs/tools/tools.go View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M instance/address.go View 1 2 3 4 1 chunk +21 lines, -0 lines 0 comments Download
M provider/local/environ.go View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M provider/provider.go View 1 2 3 1 chunk +1 line, -0 lines 1 comment Download
M state/state_test.go View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M upstart/upstart.go View 1 2 3 4 5 6 2 chunks +13 lines, -4 lines 0 comments Download
M upstart/upstart_test.go View 1 2 3 4 5 6 3 chunks +22 lines, -7 lines 0 comments Download
M worker/deployer/simple.go View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 17
thumper
https://codereview.appspot.com/12831043/diff/1/cmd/juju/addmachine.go File cmd/juju/addmachine.go (right): https://codereview.appspot.com/12831043/diff/1/cmd/juju/addmachine.go#newcode72 cmd/juju/addmachine.go:72: if strings.HasPrefix(containerSpec, "ssh:") { Since we use the "ssh:" ...
10 years, 8 months ago (2013-08-15 02:50:47 UTC) #1
axw1
On 2013/08/15 02:50:47, thumper wrote: > https://codereview.appspot.com/12831043/diff/1/cmd/juju/addmachine.go > File cmd/juju/addmachine.go (right): > > https://codereview.appspot.com/12831043/diff/1/cmd/juju/addmachine.go#newcode72 > ...
10 years, 8 months ago (2013-08-15 05:22:05 UTC) #2
axw
Please take a look.
10 years, 8 months ago (2013-08-20 03:56:19 UTC) #3
axw
Please take a look.
10 years, 8 months ago (2013-08-20 06:47:47 UTC) #4
fwereade
Lots and lots of comments, not all actionable; this is going in an excellent direction. ...
10 years, 8 months ago (2013-08-21 11:21:50 UTC) #5
axw1
Thanks for the review. I've addressed what I can today, and will continue working on ...
10 years, 8 months ago (2013-08-22 06:17:40 UTC) #6
fwereade
A few more comments; if you've got a prereq on its way, I'm WIPping this ...
10 years, 8 months ago (2013-08-22 16:29:47 UTC) #7
thumper
More things to consider :-) https://codereview.appspot.com/12831043/diff/8002/cmd/juju/destroyenvironment.go File cmd/juju/destroyenvironment.go (right): https://codereview.appspot.com/12831043/diff/8002/cmd/juju/destroyenvironment.go#newcode54 cmd/juju/destroyenvironment.go:54: // machines have been ...
10 years, 8 months ago (2013-08-23 02:58:41 UTC) #8
axw1
Thanks for the reviews. I've addressed everything (I think?) apart from fixing the tools selection. ...
10 years, 8 months ago (2013-08-23 08:31:54 UTC) #9
axw
Please take a look.
10 years, 8 months ago (2013-08-23 08:35:00 UTC) #10
axw
Please take a look.
10 years, 8 months ago (2013-08-23 09:43:30 UTC) #11
fwereade
LGTM with the following addressed. Thank you very much for all the work. https://codereview.appspot.com/12831043/diff/29001/cmd/juju/addmachine.go File ...
10 years, 8 months ago (2013-08-27 09:58:50 UTC) #12
axw1
https://codereview.appspot.com/12831043/diff/29001/cmd/juju/addmachine.go File cmd/juju/addmachine.go (right): https://codereview.appspot.com/12831043/diff/29001/cmd/juju/addmachine.go#newcode96 cmd/juju/addmachine.go:96: Env: conn.Environ, On 2013/08/27 09:58:50, fwereade wrote: > Never ...
10 years, 8 months ago (2013-08-29 04:07:36 UTC) #13
axw
Please take a look.
10 years, 8 months ago (2013-08-29 05:10:02 UTC) #14
thumper
On 2013/08/29 05:10:02, axw wrote: > Please take a look. LGTM
10 years, 8 months ago (2013-08-29 22:03:55 UTC) #15
fwereade
LGTM, just trivials. https://codereview.appspot.com/12831043/diff/29001/environs/manual/provisioner.go File environs/manual/provisioner.go (right): https://codereview.appspot.com/12831043/diff/29001/environs/manual/provisioner.go#newcode183 environs/manual/provisioner.go:183: if args.tools == nil { On ...
10 years, 8 months ago (2013-08-30 06:15:00 UTC) #16
axw1
10 years, 8 months ago (2013-08-30 06:53:01 UTC) #17
On 2013/08/30 06:15:00, fwereade wrote:
> LGTM, just trivials.

I've already merged based on the last two LGTMs, so I will address them in a new
MP.

> https://codereview.appspot.com/12831043/diff/40001/cmd/juju/addmachine.go
> File cmd/juju/addmachine.go (right):
> 
>
https://codereview.appspot.com/12831043/diff/40001/cmd/juju/addmachine.go#new...
> cmd/juju/addmachine.go:47: Args:    "[<container>:machine | <container> |
> ssh:[user@]host]",
> Huh, these aren't quite right, are they? I think it's more like:
> 
> [<(pseudo-)cloud>:<location>]
> 
> ...where ssh and lxc are the available pseudo-clouds today, and "aws",
> "hpcloud", etc, become viable at some point in the future.

lxc I can buy, but calling ssh a pseudo-cloud sounds odd to me.

>
https://codereview.appspot.com/12831043/diff/40001/cmd/juju/destroyenvironmen...
> File cmd/juju/destroyenvironment.go (right):
> 
>
https://codereview.appspot.com/12831043/diff/40001/cmd/juju/destroyenvironmen...
> cmd/juju/destroyenvironment.go:52: // TODO(axw) destroy manually provisioned
> machines, or otherwise
> Would you write a bug for this please?

Done (I did it before, I just hadn't reproposed).
https://bugs.launchpad.net/juju-core/+bug/1218688

>
https://codereview.appspot.com/12831043/diff/40001/environs/manual/provisione...
> File environs/manual/provisioner.go (right):
> 
>
https://codereview.appspot.com/12831043/diff/40001/environs/manual/provisione...
> environs/manual/provisioner.go:159: m.Remove()
> Would be good to log these errors if they happen.

Done (in a new MP).

> https://codereview.appspot.com/12831043/diff/40001/provider/provider.go
> File provider/provider.go (right):
> 
>
https://codereview.appspot.com/12831043/diff/40001/provider/provider.go#newco...
> provider/provider.go:13: Manual    = "manual"
> I'm not sure this is a thing yet. Where's it referenced? If not, the mooted
> terminology is for a "null" provider... but that shouldn't be defined until we
> have one, either.

It's used as the specified provider type, as it gets written to the upstart conf
file (later to go into agent.conf?); see environs/manual/agent.conf.

I can take it out if you like, but it's just as wrong to tell the agent that its
provider is whatever the current environment's provider is.
Sign in to reply to this message.

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