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

Issue 82930044: environs/manual: don't require resolvable hostname

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

Description

environs/manual: don't require resolvable hostname This change makes it so that the hostname provided during manual provisioning is not necessarily resolvable from the machine provisioning. If this is the case, the machine will not be given a public address. There's another change here, which is that we no longer perform a reverse lookup or record the resolved addresses in state; we only store the input address if it's an IP or if it's a resolvable hostname. All other addresses will come from the machine agent itself. Fixes lp:1300264 https://code.launchpad.net/~axwalk/juju-core/lp1300264-manual-unresolvable-address/+merge/213581 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 4

Patch Set 2 : environs/manual: don't require resolvable hostname #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -60 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M environs/manual/addresses.go View 1 chunk +25 lines, -12 lines 0 comments Download
M environs/manual/addresses_test.go View 1 2 chunks +57 lines, -17 lines 0 comments Download
M environs/manual/export_test.go View 1 chunk +1 line, -1 line 0 comments Download
M environs/manual/provisioner.go View 2 chunks +7 lines, -29 lines 0 comments Download
M provider/manual/instance.go View 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 3
axw
Please take a look.
10 years ago (2014-04-01 04:34:50 UTC) #1
wallyworld
LGTM but please consider the suggestion to improve the test https://codereview.appspot.com/82930044/diff/1/environs/manual/addresses_test.go File environs/manual/addresses_test.go (right): https://codereview.appspot.com/82930044/diff/1/environs/manual/addresses_test.go#newcode22 ...
10 years ago (2014-04-01 04:46:17 UTC) #2
axw
9 years, 12 months ago (2014-04-02 02:27:34 UTC) #3
Please take a look.

https://codereview.appspot.com/82930044/diff/1/environs/manual/addresses_test.go
File environs/manual/addresses_test.go (right):

https://codereview.appspot.com/82930044/diff/1/environs/manual/addresses_test...
environs/manual/addresses_test.go:22: func (s *addressesSuite) TestHostAddress(c
*gc.C) {
On 2014/04/01 04:46:17, wallyworld wrote:
> I'd prefer this test split up into different tests for IP address vs hostname
> etc. Also, it would be good if the mocked NetLookupHost function would error
> based on the input arg eg if host were "valid.host" it would resolve, if it
were
> "invalid.host", it would raise an error. I think that's cleaner than the
> approach taken and removes the extra variables.

Done.

https://codereview.appspot.com/82930044/diff/1/environs/manual/provisioner.go
File environs/manual/provisioner.go (right):

https://codereview.appspot.com/82930044/diff/1/environs/manual/provisioner.go...
environs/manual/provisioner.go:236: addrs = append(addrs, addr)
On 2014/04/01 04:46:17, wallyworld wrote:
> Did we want any logging here?

There's nothing really to log. We no longer use the result of resolving, other
than success/failure. No log message == success.
Sign in to reply to this message.

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