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

Issue 91740043: Support placement directives on bootstrap

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

Description

Support placement directives on bootstrap juju bootstrap will accept a single, optional positional argument that will be parsed as a placement directive. We currently only allow unscoped placement directives at bootstrap. https://code.launchpad.net/~axwalk/juju-core/lp1237709-bootstrap-placement/+merge/216971 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 2

Patch Set 2 : Support placement directives on bootstrap #

Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -109 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/bootstrap.go View 4 chunks +24 lines, -2 lines 0 comments Download
M cmd/juju/bootstrap_test.go View 4 chunks +11 lines, -5 lines 0 comments Download
M cmd/juju/cmd_test.go View 1 chunk +0 lines, -5 lines 0 comments Download
M cmd/juju/deploy_test.go View 1 chunk +3 lines, -0 lines 0 comments Download
M cmd/plugins/juju-restore/restore.go View 1 chunk +2 lines, -1 line 0 comments Download
M environs/bootstrap/bootstrap.go View 3 chunks +2 lines, -3 lines 0 comments Download
M environs/bootstrap/bootstrap_test.go View 6 chunks +25 lines, -15 lines 0 comments Download
M environs/interface.go View 2 chunks +12 lines, -4 lines 0 comments Download
M environs/jujutest/livetests.go View 2 chunks +2 lines, -2 lines 0 comments Download
M environs/jujutest/tests.go View 3 chunks +2 lines, -3 lines 0 comments Download
M environs/open_test.go View 2 chunks +1 line, -2 lines 0 comments Download
M instance/placement.go View 1 1 chunk +1 line, -1 line 0 comments Download
M juju/apiconn_test.go View 3 chunks +2 lines, -3 lines 0 comments Download
M juju/conn_test.go View 6 chunks +6 lines, -6 lines 0 comments Download
M juju/testing/conn.go View 2 chunks +1 line, -2 lines 0 comments Download
M provider/azure/environ.go View 2 chunks +2 lines, -2 lines 0 comments Download
M provider/common/bootstrap.go View 4 chunks +4 lines, -4 lines 0 comments Download
M provider/common/bootstrap_test.go View 8 chunks +13 lines, -8 lines 0 comments Download
M provider/common/mock_test.go View 2 chunks +2 lines, -1 line 0 comments Download
M provider/dummy/environs.go View 4 chunks +7 lines, -7 lines 0 comments Download
M provider/ec2/ec2.go View 1 chunk +2 lines, -2 lines 0 comments Download
M provider/ec2/local_test.go View 4 chunks +4 lines, -4 lines 0 comments Download
M provider/joyent/environ.go View 1 chunk +2 lines, -2 lines 0 comments Download
M provider/joyent/local_test.go View 3 chunks +3 lines, -3 lines 0 comments Download
M provider/local/config_test.go View 2 chunks +2 lines, -2 lines 0 comments Download
M provider/local/environ.go View 2 chunks +2 lines, -2 lines 0 comments Download
M provider/local/environ_test.go View 1 chunk +1 line, -1 line 0 comments Download
M provider/maas/environ.go View 1 chunk +2 lines, -2 lines 0 comments Download
M provider/maas/environ_whitebox_test.go View 4 chunks +4 lines, -4 lines 0 comments Download
M provider/manual/environ.go View 2 chunks +2 lines, -1 line 0 comments Download
M provider/openstack/live_test.go View 2 chunks +1 line, -2 lines 0 comments Download
M provider/openstack/local_test.go View 6 chunks +6 lines, -6 lines 0 comments Download
M provider/openstack/provider.go View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 3
axw
Please take a look.
10 years ago (2014-04-24 02:50:51 UTC) #1
wallyworld
LGTM with a suggestion. Also a drive by fix for // Directive is a scope-specific ...
10 years ago (2014-04-24 03:10:01 UTC) #2
axw
10 years ago (2014-04-24 03:37:24 UTC) #3
Please take a look.

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

https://codereview.appspot.com/91740043/diff/1/cmd/juju/bootstrap.go#newcode107
cmd/juju/bootstrap.go:107: if err != instance.ErrPlacementScopeMissing {
On 2014/04/24 03:10:01, wallyworld wrote:
> What happens if there's a different error other than ErrPlacementScopeMissing?
> In that case we should just return that other error shouldn't we? ie there's a
> difference between an unsupported placement directive and a placement
directive
> that doesn't parse due to some other error. Even if there's no other error
that
> can be returned (yet), reworking the conditional would make it explicit that
we
> are only interested in a specific case.

There are other errors, but they're not meaningful to us if we don't support
scoped placements. For example, lxc:non-numeric will fail to parse, but we
bootstrap doesn't care about why; it only cares that "lxc:anything" is not
supported by bootstrap.
Sign in to reply to this message.

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