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

Issue 11027043: Part of the work to start an Azure instance. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by jtv.canonical
Modified:
10 years, 8 months ago
Reviewers:
rvb, mp+173637, fwereade
Visibility:
Public.

Description

Part of the work to start an Azure instance. The design was discussed with the team: create Service, create Deployment, get Deployment's full DNS name, set DNS name as label on the Service so that Instances() and AllInstances() can retrieve all the immediately required information for instances without having to query each Deployment individually. (You'll note that this creates a state where an instance has no DNS name yet; other providers have this state too, but the Azure one did not have it yet. Thanks to the extracted generic implementation of WaitDNS, there is no change to the WaitDNS implementation.) You'll note that internalStartInstances() is not connected to StartInstances yet. The plan is to refactor StartInstances such that the code that's currently duplicated between all providers' StartInstances and Bootstrap methods can be extracted and build on a single StartInstances method in the Environ interface. Currently all providers have an "internal" and an "external" StartInstances, with Bootstrap and the external StartInstances both building on the internal StartInstances. In this branch you see only the internal one for now. It's not done yet, but the diff had gotten big enough that it was time to get something landed. Some of this code is tied to the "one instance, one deployment, one service" model. We're probably going to ditch that model before too long, and so (as Raphaël did in an earlier branch) everything that depends on it is tagged with "(instance==service)" in the comments. Searching for that string should give us a quick listing of things that need changing when we go to work on that assumption. https://code.launchpad.net/~jtv/juju-core/az-startinstance/+merge/173637 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 6

Patch Set 2 : Part of the work to start an Azure instance. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+436 lines, -23 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M environs/azure/environ.go View 1 2 chunks +183 lines, -1 line 0 comments Download
M environs/azure/environ_test.go View 1 4 chunks +236 lines, -9 lines 3 comments Download
M environs/azure/instance.go View 1 2 chunks +3 lines, -3 lines 0 comments Download
M environs/azure/instance_test.go View 1 1 chunk +12 lines, -10 lines 0 comments Download

Messages

Total messages: 9
jtv.canonical
Please take a look.
10 years, 9 months ago (2013-07-09 03:59:28 UTC) #1
rvb
Nice branch! Thanks for starting the work on StartInstance which is really the provider's "pièce ...
10 years, 9 months ago (2013-07-09 09:23:10 UTC) #2
jtv.canonical
On 2013/07/09 09:23:10, rvb wrote: > https://codereview.appspot.com/11027043/diff/1/environs/azure/environ.go#newcode147 > environs/azure/environ.go:147: return fmt.Sprintf("-(creating: %s)-", > serviceName) > ...
10 years, 9 months ago (2013-07-09 09:57:34 UTC) #3
jtv.canonical
OK: I updated things so that we always take the entire FQDN as given by ...
10 years, 9 months ago (2013-07-09 10:24:20 UTC) #4
jtv.canonical
Please take a look.
10 years, 9 months ago (2013-07-09 10:26:26 UTC) #5
fwereade
LGTM modulo testing quibbles. https://codereview.appspot.com/11027043/diff/9001/environs/azure/environ_test.go File environs/azure/environ_test.go (right): https://codereview.appspot.com/11027043/diff/9001/environs/azure/environ_test.go#newcode369 environs/azure/environ_test.go:369: func (EnvironSuite) TestAttemptCreateServiceCreatesService(c *C) { ...
10 years, 9 months ago (2013-07-09 11:22:42 UTC) #6
rvb
> > Meanwhile, I wasn't sure that the fixed domain is actually guaranteed. I see ...
10 years, 9 months ago (2013-07-09 14:56:32 UTC) #7
rvb
On 2013/07/09 10:24:20, jtv.canonical wrote: > OK: I updated things so that we always take ...
10 years, 9 months ago (2013-07-09 14:59:20 UTC) #8
jtv.canonical
10 years, 9 months ago (2013-07-09 15:29:51 UTC) #9
https://codereview.appspot.com/11027043/diff/9001/environs/azure/environ_test.go
File environs/azure/environ_test.go (right):

https://codereview.appspot.com/11027043/diff/9001/environs/azure/environ_test...
environs/azure/environ_test.go:514: c.Check(err, NotNil)
On 2013/07/09 11:22:42, fwereade wrote:
> I'd prefer to check exact errors please.

In this case I can't in good conscience test the exact error message, because
it's highly dependent on how the parser (not our code) happens to diagnose and
describe the problem.  That would be very brittle, and as it happens the error
message itself looks a bit nonsensical so I'd expect it to be fixed soon.

So instead, I prefixed it with my own error context and tested for that.
Sign in to reply to this message.

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