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

Issue 14433058: Providers are responsible for selecting tools

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 6 months ago by axw
Modified:
10 years, 5 months ago
Reviewers:
mp+190032, fwereade, wallyworld
Visibility:
Public.

Description

Providers are responsible for selecting tools This change makes providers responsible for selecting bootstrap tools, and ensuring they are available in storage. The null provider is updated to select the tools appropriate to the bootstrap host. Other providers use a default implementation in environs/bootstrap, which has been extracted from cmd/juju/bootstrap.go. One test fails due to a logging change. This is fixed by https://codereview.appspot.com/14430064/. Fixes #1236691 https://code.launchpad.net/~axwalk/juju-core/lp1236691-null-provider-default-series-take2/+merge/190032 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Providers are responsible for selecting tools #

Total comments: 19

Patch Set 3 : Providers are responsible for selecting tools #

Total comments: 14

Patch Set 4 : Providers are responsible for selecting tools #

Unified diffs Side-by-side diffs Delta from patch set Stats (+771 lines, -509 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/bootstrap.go View 1 2 3 6 chunks +1 line, -89 lines 0 comments Download
M cmd/juju/bootstrap_test.go View 1 6 chunks +10 lines, -52 lines 0 comments Download
M cmd/juju/upgradejuju.go View 1 2 chunks +1 line, -3 lines 0 comments Download
M cmd/juju/upgradejuju_test.go View 1 1 chunk +1 line, -2 lines 0 comments Download
M cmd/jujud/bootstrap.go View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M cmd/jujud/bootstrap_test.go View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M environs/bootstrap/bootstrap.go View 1 2 3 2 chunks +22 lines, -34 lines 0 comments Download
M environs/bootstrap/bootstrap_test.go View 1 3 chunks +12 lines, -3 lines 0 comments Download
A environs/bootstrap/state.go View 1 2 3 1 chunk +97 lines, -0 lines 0 comments Download
A environs/bootstrap/state_test.go View 1 2 3 1 chunk +118 lines, -0 lines 0 comments Download
A environs/bootstrap/synctools.go View 1 1 chunk +123 lines, -0 lines 0 comments Download
M environs/interface.go View 1 2 chunks +5 lines, -2 lines 0 comments Download
M environs/jujutest/livetests.go View 1 3 chunks +3 lines, -2 lines 0 comments Download
M environs/jujutest/tests.go View 1 4 chunks +6 lines, -5 lines 0 comments Download
M environs/manual/bootstrap.go View 1 2 3 6 chunks +22 lines, -8 lines 0 comments Download
M environs/manual/bootstrap_test.go View 1 2 3 5 chunks +47 lines, -8 lines 0 comments Download
M environs/manual/detection.go View 1 chunk +6 lines, -4 lines 0 comments Download
M environs/manual/detection_test.go View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M environs/manual/fakessh.go View 1 2 3 2 chunks +35 lines, -24 lines 0 comments Download
M environs/manual/provisioner.go View 1 chunk +1 line, -1 line 0 comments Download
M environs/manual/provisioner_test.go View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M environs/simplestreams/simplestreams.go View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M environs/sync/sync.go View 1 4 chunks +17 lines, -5 lines 0 comments Download
M environs/testing/tools.go View 1 2 chunks +7 lines, -2 lines 0 comments Download
M environs/tools/storage.go View 1 1 chunk +1 line, -0 lines 0 comments Download
M environs/tools/tools.go View 1 2 chunks +2 lines, -1 line 0 comments Download
M environs/tools/tools_test.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M provider/azure/environ.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M provider/azure/environ_test.go View 1 2 3 5 chunks +7 lines, -7 lines 0 comments Download
M provider/common/bootstrap.go View 1 2 3 5 chunks +38 lines, -5 lines 0 comments Download
M provider/common/bootstrap_test.go View 1 2 3 6 chunks +66 lines, -12 lines 0 comments Download
M provider/common/mock_test.go View 1 3 chunks +27 lines, -0 lines 0 comments Download
M provider/common/state.go View 1 2 3 2 chunks +2 lines, -87 lines 0 comments Download
M provider/common/state_test.go View 1 2 3 2 chunks +0 lines, -103 lines 0 comments Download
M provider/dummy/environs.go View 1 2 3 4 chunks +9 lines, -3 lines 0 comments Download
M provider/ec2/ec2.go View 1 1 chunk +2 lines, -2 lines 0 comments Download
M provider/ec2/local_test.go View 1 2 3 3 chunks +2 lines, -3 lines 0 comments Download
M provider/local/environ.go View 1 2 3 4 chunks +10 lines, -3 lines 0 comments Download
M provider/maas/environ.go View 1 1 chunk +2 lines, -2 lines 0 comments Download
M provider/maas/environ_test.go View 1 2 3 5 chunks +12 lines, -6 lines 0 comments Download
M provider/null/config_test.go View 2 chunks +0 lines, -5 lines 0 comments Download
M provider/null/environ.go View 1 2 3 1 chunk +16 lines, -5 lines 0 comments Download
M provider/null/provider.go View 1 1 chunk +5 lines, -1 line 0 comments Download
A provider/null/suite_test.go View 1 1 chunk +14 lines, -0 lines 0 comments Download
M provider/openstack/local_test.go View 1 2 3 2 chunks +1 line, -2 lines 0 comments Download
M provider/openstack/provider.go View 1 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 9
axw
Please take a look.
10 years, 6 months ago (2013-10-09 07:13:51 UTC) #1
fwereade
On 2013/10/09 07:13:51, axw wrote: > Please take a look. I don't think this is ...
10 years, 6 months ago (2013-10-09 18:04:30 UTC) #2
axw
On 2013/10/09 18:04:30, fwereade wrote: > On 2013/10/09 07:13:51, axw wrote: > > Please take ...
10 years, 6 months ago (2013-10-10 02:14:52 UTC) #3
axw
Please take a look.
10 years, 6 months ago (2013-10-15 05:17:39 UTC) #4
fwereade
Sorry this has taken so long. I'm a bit uncomfortable about the sheer amount of ...
10 years, 5 months ago (2013-11-14 09:29:45 UTC) #5
axw
Please take a look. https://codereview.appspot.com/14433058/diff/5001/environs/bootstrap/bootstrap.go File environs/bootstrap/bootstrap.go (right): https://codereview.appspot.com/14433058/diff/5001/environs/bootstrap/bootstrap.go#newcode56 environs/bootstrap/bootstrap.go:56: newVersion, toolsList = toolsList.Newest() On ...
10 years, 5 months ago (2013-11-15 03:51:47 UTC) #6
wallyworld
In general I like that responsibility for setting up tools has been delegated to the ...
10 years, 5 months ago (2013-11-17 23:48:46 UTC) #7
axw
Please take a look. https://codereview.appspot.com/14433058/diff/9001/cmd/juju/bootstrap.go File cmd/juju/bootstrap.go (right): https://codereview.appspot.com/14433058/diff/9001/cmd/juju/bootstrap.go#newcode100 cmd/juju/bootstrap.go:100: On 2013/11/17 23:48:46, wallyworld wrote: ...
10 years, 5 months ago (2013-11-18 05:10:01 UTC) #8
wallyworld
10 years, 5 months ago (2013-11-18 05:48:33 UTC) #9
Thanks :-)
LGTM

https://codereview.appspot.com/14433058/diff/9001/cmd/juju/bootstrap.go
File cmd/juju/bootstrap.go (right):

https://codereview.appspot.com/14433058/diff/9001/cmd/juju/bootstrap.go#newco...
cmd/juju/bootstrap.go:100: 
On 2013/11/18 05:10:01, axw wrote:
> On 2013/11/17 23:48:46, wallyworld wrote:
> > One implication of removing this check and running it as part of
> > bootstrap.Bootstrap() below is that we may well end up uploading tools only
to
> > then tell the user "sorry, already bootstrapped". This check really does
need
> to
> > be run asap in the bootstrap process, before we do anything, so that we fail
> as
> > early as possible.
> 
> There are a couple of nice things about putting it inside Bootstrap, one being
> that Bootstrap fails if the machine is already bootstrapped (no need to test
> that property via the CLI command). But you're right, we shouldn't break
> behaviour for --upload-tools. If nothing else, it'll make developers' lives
> harder.
> 
> I'll revert this.

Yeah, I agree it's a bit unfortunate. It's not just developers also - people
like Dave and Marco regularly run from source to get the latest goodness.
Sign in to reply to this message.

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