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

Issue 85040046: Introduce instance.Placement

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years ago by axw
Modified:
9 years, 12 months ago
Reviewers:
mp+214761, jameinel, wallyworld, fwereade
Visibility:
Public.

Description

Introduce instance.Placement This change introduces a new Placement structure in the instance package that encapsulates machine-id, container, and (new) environment-specific placement directives. The add-machine subcommand is modified to pass this new Placement structure through the AddMachine client API, which calls a new state method AddMachineWithPlacement. Machine-id and container placement do the same thing as before, while new environment- specific placement structures are stored in state. A new state policy is added to allow an Environ to validate placement. The provisioner API and worker are updated to pass Placement through to StartInstance. Follow-ups to come: - update MAAS provider to pick maas-name out the Placement. - update ec2, OpenStack (and MAAS?) to pick out availbility-zone from Placement. - update add-unit and deploy subcommands to use Placement; this will involve modifications to state unit assignment to choose existing matching machines (e.g. for maas-name). https://code.launchpad.net/~axwalk/juju-core/addmachine-placement/+merge/214761 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 50

Patch Set 2 : Introduce instance.Placement #

Total comments: 17

Patch Set 3 : Introduce instance.Placement #

Patch Set 4 : Introduce instance.Placement #

Patch Set 5 : Introduce instance.Placement #

Patch Set 6 : Introduce instance.Placement #

Patch Set 7 : Introduce instance.Placement #

Unified diffs Side-by-side diffs Delta from patch set Stats (+685 lines, -219 lines) Patch
A [revision details] View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/addmachine.go View 1 2 3 4 5 4 chunks +50 lines, -36 lines 0 comments Download
M cmd/juju/addmachine_test.go View 1 2 3 4 5 1 chunk +9 lines, -5 lines 0 comments Download
M environs/broker.go View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M environs/jujutest/livetests.go View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
A instance/placement.go View 1 2 3 4 5 1 chunk +85 lines, -0 lines 0 comments Download
A instance/placement_test.go View 1 2 3 4 5 1 chunk +76 lines, -0 lines 0 comments Download
M names/machine.go View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M names/machine_test.go View 1 2 4 chunks +6 lines, -4 lines 0 comments Download
M provider/azure/environ.go View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M provider/azure/instancetype_test.go View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M provider/common/policies.go View 1 2 3 2 chunks +0 lines, -15 lines 0 comments Download
M provider/dummy/environs.go View 1 2 3 2 chunks +8 lines, -1 line 0 comments Download
M provider/ec2/ec2.go View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M provider/ec2/local_test.go View 1 2 3 1 chunk +6 lines, -3 lines 0 comments Download
M provider/joyent/environ.go View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M provider/local/environ.go View 1 2 3 2 chunks +7 lines, -1 line 0 comments Download
M provider/maas/environ.go View 1 2 3 2 chunks +9 lines, -1 line 0 comments Download
M provider/manual/environ.go View 1 2 3 2 chunks +1 line, -2 lines 0 comments Download
M provider/openstack/local_test.go View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M provider/openstack/provider.go View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M state/addmachine.go View 1 2 3 4 chunks +9 lines, -4 lines 0 comments Download
M state/api/client.go View 1 2 3 1 chunk +14 lines, -1 line 0 comments Download
M state/api/params/internal.go View 1 2 3 1 chunk +20 lines, -0 lines 0 comments Download
M state/api/params/params.go View 1 2 2 chunks +6 lines, -1 line 0 comments Download
M state/api/provisioner/machine.go View 1 2 3 chunks +8 lines, -32 lines 0 comments Download
M state/api/provisioner/provisioner_test.go View 1 2 3 1 chunk +29 lines, -43 lines 0 comments Download
M state/apiserver/client/client.go View 1 2 3 3 chunks +42 lines, -9 lines 0 comments Download
M state/apiserver/client/client_test.go View 1 2 3 3 chunks +62 lines, -16 lines 0 comments Download
M state/apiserver/provisioner/provisioner.go View 1 2 3 1 chunk +43 lines, -0 lines 0 comments Download
M state/apiserver/provisioner/provisioner_test.go View 1 2 3 1 chunk +81 lines, -0 lines 0 comments Download
M state/machine.go View 1 2 3 2 chunks +9 lines, -0 lines 0 comments Download
M state/policy.go View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M state/prechecker_test.go View 1 2 3 7 chunks +22 lines, -13 lines 0 comments Download
M worker/provisioner/provisioner_task.go View 1 2 3 4 5 6 5 chunks +42 lines, -20 lines 0 comments Download

Messages

Total messages: 14
axw
Please take a look.
10 years ago (2014-04-08 13:47:23 UTC) #1
wallyworld
Some initial thoughts added. I assume William is ok with the design? Seems ok to ...
10 years ago (2014-04-09 04:52:18 UTC) #2
axw
> I assume William is ok with the design? I ran the basic idea by ...
10 years ago (2014-04-09 05:20:22 UTC) #3
jameinel
I'm a little concerned that we're changing an API. How will we handle trying to ...
10 years ago (2014-04-09 09:58:21 UTC) #4
axw
On 2014/04/09 09:58:21, jameinel wrote: > I'm a little concerned that we're changing an API. ...
10 years ago (2014-04-11 08:42:28 UTC) #5
fwereade
Coming along nicely -- let me know what you think about the following. https://codereview.appspot.com/85040046/diff/1/cmd/juju/addmachine.go File ...
10 years ago (2014-04-11 12:27:11 UTC) #6
axw
Please take a look. https://codereview.appspot.com/85040046/diff/1/cmd/juju/addmachine.go File cmd/juju/addmachine.go (right): https://codereview.appspot.com/85040046/diff/1/cmd/juju/addmachine.go#newcode127 cmd/juju/addmachine.go:127: results, err := client.AddMachines([]params.AddMachineParams{machineParams}) On ...
10 years ago (2014-04-17 06:13:46 UTC) #7
fwereade
Looking very nice, only a couple of details that maybe demand thought/discussion. https://codereview.appspot.com/85040046/diff/1/instance/placement.go File instance/placement.go ...
10 years ago (2014-04-18 09:15:51 UTC) #8
axw
Please take a look. https://codereview.appspot.com/85040046/diff/20001/cmd/juju/addmachine.go File cmd/juju/addmachine.go (right): https://codereview.appspot.com/85040046/diff/20001/cmd/juju/addmachine.go#newcode123 cmd/juju/addmachine.go:123: // message. On 2014/04/18 09:15:52, ...
9 years, 12 months ago (2014-04-22 07:35:29 UTC) #9
axw
Please take a look.
9 years, 12 months ago (2014-04-22 09:43:23 UTC) #10
axw
Please take a look.
9 years, 12 months ago (2014-04-22 10:08:01 UTC) #11
wallyworld
LGTM with the error tweak as discussed
9 years, 12 months ago (2014-04-23 04:47:59 UTC) #12
axw
Please take a look.
9 years, 12 months ago (2014-04-23 05:55:32 UTC) #13
axw
9 years, 12 months ago (2014-04-23 06:43:39 UTC) #14
Please take a look.
Sign in to reply to this message.

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