Merge lp://qastaging/~wallyworld/juju-core/ec2-root-disk-constraint into lp://qastaging/~go-bot/juju-core/trunk
Proposed by
Ian Booth
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Ian Booth | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 2815 | ||||
Proposed branch: | lp://qastaging/~wallyworld/juju-core/ec2-root-disk-constraint | ||||
Merge into: | lp://qastaging/~go-bot/juju-core/trunk | ||||
Diff against target: |
64 lines (+7/-5) 3 files modified
environs/instances/instancetype.go (+1/-1) environs/instances/instancetype_test.go (+0/-4) provider/ec2/image_test.go (+6/-0) |
||||
To merge this branch: | bzr merge lp://qastaging/~wallyworld/juju-core/ec2-root-disk-constraint | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email:
|
Commit message
Fix root-disk consraints on ec2
EC2 instance types do not include a root
disk size as this is set on instance
creation. This was causing the contraints
matching to fail when root disk was specified.
The fix is to ignore 0 root disk values when
matching constraints.
Description of the change
Fix root-disk consraints on ec2
EC2 instance types do not include a root
disk size as this is set on instance
creation. This was causing the contraints
matching to fail when root disk was specified.
The fix is to ignore 0 root disk values when
matching constraints.
To post a comment you must log in.
Reviewers: mp+221664_ code.launchpad. net,
Message:
Please take a look.
Description:
Fix root-disk consraints on ec2
EC2 instance types do not include a root
disk size as this is set on instance
creation. This was causing the contraints
matching to fail when root disk was specified.
The fix is to ignore 0 root disk values when
matching constraints.
https:/ /code.launchpad .net/~wallyworl d/juju- core/ec2- root-disk- constraint/ +merge/ 221664
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/106750044/
Affected files (+9, -5 lines): instances/ instancetype. go instances/ instancetype_ test.go ec2/image_ test.go
A [revision details]
M environs/
M environs/
M provider/
Index: [revision details] 20140530163551- b1m9k0br0iaxwqi m
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-
+New revision: <email address hidden>
Index: environs/ instances/ instancetype. go instances/ instancetype. go' instances/ instancetype. go 2014-03-20 05:03:57 +0000 instances/ instancetype. go 2014-06-02 05:50:33 +0000 *cons.Tags,
=== modified file 'environs/
--- environs/
+++ environs/
@@ -49,7 +49,7 @@
if cons.Mem != nil && itype.Mem < *cons.Mem {
return nothing, false
}
- if cons.RootDisk != nil && itype.RootDisk < *cons.RootDisk {
+ if cons.RootDisk != nil && itype.RootDisk > 0 && itype.RootDisk <
*cons.RootDisk {
return nothing, false
}
if cons.Tags != nil && len(*cons.Tags) > 0 && !tagsMatch(
itype.Tags) {
Index: environs/ instances/ instancetype_ test.go instances/ instancetype_ test.go' instances/ instancetype_ test.go 2014-05-20 04:27:02 +0000 instances/ instancetype_ test.go 2014-06-02 05:50:33 +0000
=== modified file 'environs/
--- environs/
+++ environs/
@@ -54,7 +54,6 @@
CpuPower: CpuPower(800),
Mem: 15360,
Cost: 480,
- RootDisk: 65536,
},
{
Name: "t1.micro",
@@ -80,7 +79,6 @@
CpuPower: CpuPower(2000),
Mem: 7168,
Cost: 580,
- RootDisk: 32768,
},
{
Name: "cc1.4xlarge",
@@ -89,7 +87,6 @@
CpuPower: CpuPower(3350),
Mem: 23552,
Cost: 1300,
- RootDisk: 32768,
VirtType: &hvm,
}, {
Name: "cc2.8xlarge",
@@ -98,7 +95,6 @@
CpuPower: CpuPower(8800),
Mem: 61952,
Cost: 2400,
- RootDisk: 131072,
VirtType: &hvm,
},
}
Index: provider/ ec2/image_ test.go ec2/image_ test.go' ec2/image_ test.go 2014-05-19 09:06:00 +0000 ec2/image_ test.go 2014-06-02 05:50:33 +0000 type=c1. medium" ,
=== modified file 'provider/
--- provider/
+++ provider/
@@ -117,6 +117,12 @@
cons: "instance-
itype: "c1.medium",
image: "ami-00000034",
+ }, {
+ series: "precise",
+ arches: both,
+ cons: "mem=4G root-disk=16384M",
+ itype: "m1.large",
+ image: "ami-00000033",
},
}