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

Issue 58950043: Fix instance type selection (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 3 months ago by wallyworld
Modified:
10 years, 2 months ago
Reviewers:
dimitern, fwereade, mp+204159
Visibility:
Public.

Description

Fix instance type selection Instance type selection will, by default, choose an instance with enough memory for mong (1024M). That is unless the user has specified a memory constraint. If no matching instances are found, an error is returned. Previously, instead of an error an arbitary instance with 1024M would be chosen. It's perhaps easiest to see the behaviour by looking at the tests in instancetype_test. With the old code, several of the tests fail, especially the memory ones where other constraints are used also. BTW - I tested on Canonistack and EC2. On Canonistack, the default instance selection was m1.tiny (512MB) but this branch fixes that so that now cpu1-ram1-disk10-ephemeral20 (1024MB) is used. On EC2, attempting to deploy with cpu-cores=9000 results in an error. https://code.launchpad.net/~wallyworld/juju-core/fix-instance-type-matching/+merge/204159 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Fix instance type selection #

Patch Set 3 : Fix instance type selection #

Total comments: 9

Patch Set 4 : Fix instance type selection #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -47 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M environs/instances/instancetype.go View 1 2 3 2 chunks +31 lines, -39 lines 2 comments Download
M environs/instances/instancetype_test.go View 1 2 chunks +38 lines, -8 lines 0 comments Download

Messages

Total messages: 8
wallyworld
Please take a look.
10 years, 3 months ago (2014-01-31 07:10:09 UTC) #1
wallyworld
Please take a look.
10 years, 3 months ago (2014-02-01 00:39:32 UTC) #2
wallyworld
Please take a look.
10 years, 3 months ago (2014-02-01 00:42:48 UTC) #3
dimitern
LGTM with some suggestions. https://codereview.appspot.com/58950043/diff/40001/environs/instances/instancetype.go File environs/instances/instancetype.go (right): https://codereview.appspot.com/58950043/diff/40001/environs/instances/instancetype.go#newcode98 environs/instances/instancetype.go:98: // (previously an instance type ...
10 years, 2 months ago (2014-02-10 08:27:13 UTC) #4
wallyworld
Please take a look. https://codereview.appspot.com/58950043/diff/40001/environs/instances/instancetype.go File environs/instances/instancetype.go (right): https://codereview.appspot.com/58950043/diff/40001/environs/instances/instancetype.go#newcode98 environs/instances/instancetype.go:98: // (previously an instance type ...
10 years, 2 months ago (2014-02-11 00:39:03 UTC) #5
dimitern
https://codereview.appspot.com/58950043/diff/40001/environs/instances/instancetype_test.go File environs/instances/instancetype_test.go (right): https://codereview.appspot.com/58950043/diff/40001/environs/instances/instancetype_test.go#newcode155 environs/instances/instancetype_test.go:155: about: "small mem specified, use that even though less ...
10 years, 2 months ago (2014-02-11 09:59:57 UTC) #6
fwereade
LGTM, but an explicit tie-breaker would be really nice. https://codereview.appspot.com/58950043/diff/40001/environs/instances/instancetype_test.go File environs/instances/instancetype_test.go (right): https://codereview.appspot.com/58950043/diff/40001/environs/instances/instancetype_test.go#newcode155 environs/instances/instancetype_test.go:155: ...
10 years, 2 months ago (2014-02-13 15:19:21 UTC) #7
wallyworld
10 years, 2 months ago (2014-02-13 23:55:22 UTC) #8
I added a cost based tie breaker

https://codereview.appspot.com/58950043/diff/60001/environs/instances/instanc...
File environs/instances/instancetype.go (right):

https://codereview.appspot.com/58950043/diff/60001/environs/instances/instanc...
environs/instances/instancetype.go:99: // - if no matches and no mem constraint
specified, try again and return any matching instance
On 2014/02/13 15:19:21, fwereade wrote:
> "any": would be nice to tie-break equal-greatest-memory machines by cost

Done.
Sign in to reply to this message.

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