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

Issue 8816045: Openstack can use constraints (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years ago by wallyworld
Modified:
10 years, 11 months ago
Reviewers:
mp+159301
Visibility:
Public.

Description

Openstack can use constraints This branch removes the manadtory requirement to specify and image id and flavor name when using juju with openstack. These config items can still be specified and will be used as a fallback if required, but now the expected workflow is to use contraints just like for ec2 to determine what type and size of instance to run. The bulk of the business logic is moved from environs.ec2 up to environs, and this is now shared between ec2 and openstack. Each of these providers provide a bit of specific glue logic to tie it all together. ec2 uses hard coded instance type, openstack queries the available flavors and uses information from there. ec2 looks to files located at http://cloud-images.ubuntu.com to see what the available instances are by looking in metadata files. openstack clouds don't have this luxury so the implementation in this branch allows for the instance metadata files to be placed in the private or public storage. The private storage takes precedence. The files live under a directory structure named like so: series-image-metadata/<series>/server/released.current.txt This mimics the layout on cloud-images (with a differently named top level directory). The next branch will remove the hard coded instance id and flavor name from the live openstack tests as these are now no longer required. https://code.launchpad.net/~wallyworld/juju-core/openstack-image-lookup/+merge/159301 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Openstack can use constraints #

Total comments: 10

Patch Set 3 : Openstack can use constraints #

Total comments: 54

Patch Set 4 : Openstack can use constraints #

Total comments: 14

Patch Set 5 : Openstack can use constraints #

Total comments: 20

Patch Set 6 : Openstack can use constraints #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1125 lines, -704 lines) Patch
A [revision details] View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M environs/ec2/ec2.go View 1 2 3 4 5 4 chunks +17 lines, -9 lines 0 comments Download
M environs/ec2/export_test.go View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M environs/ec2/image.go View 1 2 3 4 5 1 chunk +35 lines, -131 lines 0 comments Download
M environs/ec2/image_test.go View 1 2 3 4 5 8 chunks +33 lines, -146 lines 0 comments Download
M environs/ec2/instancetype.go View 1 2 3 4 2 chunks +128 lines, -207 lines 0 comments Download
A environs/instances/image.go View 1 2 3 1 chunk +209 lines, -0 lines 0 comments Download
A environs/instances/image_test.go View 1 2 3 4 1 chunk +252 lines, -0 lines 0 comments Download
A environs/instances/instancetype.go View 1 2 3 4 1 chunk +109 lines, -0 lines 0 comments Download
M environs/instances/instancetype_test.go View 1 2 3 4 chunks +111 lines, -67 lines 0 comments Download
M environs/openstack/export_test.go View 1 2 3 4 3 chunks +65 lines, -11 lines 0 comments Download
M environs/openstack/image.go View 1 2 3 1 chunk +36 lines, -55 lines 0 comments Download
M environs/openstack/local_test.go View 1 2 3 5 chunks +71 lines, -67 lines 0 comments Download
M environs/openstack/provider.go View 1 2 3 6 chunks +30 lines, -10 lines 0 comments Download
A environs/testing/instances.go View 1 2 3 4 1 chunk +26 lines, -0 lines 0 comments Download

Messages

Total messages: 16
wallyworld
Please take a look.
11 years ago (2013-04-19 12:40:01 UTC) #1
jameinel
LGTM. Thanks for pulling all this stuff into common code. https://codereview.appspot.com/8816045/diff/2001/environs/ec2/image.go File environs/ec2/image.go (right): https://codereview.appspot.com/8816045/diff/2001/environs/ec2/image.go#newcode29 ...
11 years ago (2013-04-21 13:09:42 UTC) #2
wallyworld
Please take a look. https://codereview.appspot.com/8816045/diff/2001/environs/ec2/image.go File environs/ec2/image.go (right): https://codereview.appspot.com/8816045/diff/2001/environs/ec2/image.go#newcode29 environs/ec2/image.go:29: return environs.FindInstanceSpec(r, ic, allInstanceTypes, allRegionCosts) ...
11 years ago (2013-04-22 02:09:34 UTC) #3
dimitern
Generally LGTM, with some trivials. https://codereview.appspot.com/8816045/diff/9001/environs/ec2/image_test.go File environs/ec2/image_test.go (right): https://codereview.appspot.com/8816045/diff/9001/environs/ec2/image_test.go#newcode42 environs/ec2/image_test.go:42: strs[i] = fmt.Sprintf("\t\t\t\t%s\t%s\t%s\t%s\t\t\t%s\t\t\n", args...) ...
11 years ago (2013-04-23 11:44:55 UTC) #4
wallyworld
Thanks for the review, appreciated. I've addressed the issues highlighted. https://codereview.appspot.com/8816045/diff/9001/environs/ec2/image_test.go File environs/ec2/image_test.go (right): https://codereview.appspot.com/8816045/diff/9001/environs/ec2/image_test.go#newcode42 ...
11 years ago (2013-04-24 00:56:52 UTC) #5
fwereade
Sorry, but NOT LGTM until we've spoken about this a bit. I'm keen to factor ...
11 years ago (2013-04-24 16:18:15 UTC) #6
wallyworld
I've addressed the issue with the constraints clustered attribute and moved the ec2 specific cpu ...
11 years ago (2013-04-26 05:02:35 UTC) #7
wallyworld
Please take a look.
11 years ago (2013-04-26 05:04:34 UTC) #8
fwereade
Thanks, this is much closer, I think; I still have opinions I will voice but ...
10 years, 12 months ago (2013-04-28 23:01:47 UTC) #9
wallyworld
Please take a look. https://codereview.appspot.com/8816045/diff/2002/environs/ec2/image_test.go File environs/ec2/image_test.go (right): https://codereview.appspot.com/8816045/diff/2002/environs/ec2/image_test.go#newcode31 environs/ec2/image_test.go:31: func imagesFields(srcs ...string) string { ...
10 years, 12 months ago (2013-04-29 01:07:51 UTC) #10
dave_cheney.net
Hi Ian, I would prefer to see this as two CLs, one splitting off the ...
10 years, 12 months ago (2013-04-29 06:14:28 UTC) #11
wallyworld
https://codereview.appspot.com/8816045/diff/29001/environs/ec2/ec2.go File environs/ec2/ec2.go (right): https://codereview.appspot.com/8816045/diff/29001/environs/ec2/ec2.go#newcode401 environs/ec2/ec2.go:401: var ebsStorage = "ebs" On 2013/04/29 06:14:29, dfc wrote: ...
10 years, 12 months ago (2013-04-29 07:19:17 UTC) #12
fwereade
a couple of thoughts for reference points in discussion https://codereview.appspot.com/8816045/diff/29001/environs/ec2/ec2.go File environs/ec2/ec2.go (right): https://codereview.appspot.com/8816045/diff/29001/environs/ec2/ec2.go#newcode401 environs/ec2/ec2.go:401: ...
10 years, 12 months ago (2013-04-29 11:53:48 UTC) #13
fwereade
on discussion, LGTM on the understanding that the way constraints can be ignored by default-instance-type ...
10 years, 12 months ago (2013-04-29 12:16:28 UTC) #14
dave_cheney.net
If William is happy then i'm happy too, LGTM. On Mon, Apr 29, 2013 at ...
10 years, 12 months ago (2013-04-29 13:48:18 UTC) #15
wallyworld
10 years, 12 months ago (2013-04-30 05:07:07 UTC) #16
*** Submitted:

Openstack can use constraints

This branch removes the manadtory requirement to specify and image id and flavor
name when using juju with openstack. These config items can still be specified
and
will be used as a fallback if required, but now the expected workflow is to use
contraints just like for ec2 to determine what type and size of instance to run.

The bulk of the business logic is moved from environs.ec2 up to environs, and
this is
now shared between ec2 and openstack. Each of these providers provide a bit of
specific
glue logic to tie it all together. ec2 uses hard coded instance type, openstack
queries
the available flavors and uses information from there.

ec2 looks to files located at http://cloud-images.ubuntu.com to see what the
available
instances are by looking in metadata files. openstack clouds don't have this
luxury 
so the implementation in this branch allows for the instance metadata files to
be placed
in the private or public storage. The private storage takes precedence. The
files live
under a directory structure named like so:
series-image-metadata/<series>/server/released.current.txt 
This mimics the layout on cloud-images (with a differently named top level
directory). 

The next branch will remove the hard coded instance id and flavor name from the
live
openstack tests as these are now no longer required.

R=jameinel, dimitern, fwereade, dfc
CC=
https://codereview.appspot.com/8816045
Sign in to reply to this message.

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