Merge lp:~wallyworld/juju-core/fix-instance-type-matching into lp:~go-bot/juju-core/trunk
Status: | Merged |
---|---|
Approved by: | Ian Booth |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2323 |
Proposed branch: | lp:~wallyworld/juju-core/fix-instance-type-matching |
Merge into: | lp:~go-bot/juju-core/trunk |
Diff against target: |
231 lines (+94/-55) 4 files modified
environs/instances/instancetype.go (+38/-40) environs/instances/instancetype_test.go (+53/-12) provider/ec2/image_test.go (+1/-1) provider/openstack/local_test.go (+2/-2) |
To merge this branch: | bzr merge lp:~wallyworld/juju-core/fix-instance-type-matching |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+204159@code.launchpad.net |
Commit message
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.
Description of the change
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-
cpu-cores=9000 results in an error.
Reviewers: mp+204159_ code.launchpad. net,
Message:
Please take a look.
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.
https:/ /code.launchpad .net/~wallyworl d/juju- core/fix- instance- type-matching/ +merge/ 204159
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/58950043/
Affected files (+86, -40 lines): instances/ instancetype. go instances/ instancetype_ test.go
A [revision details]
M environs/
M environs/