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

Issue 56310044: manual: mark specified host as a public address

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

Description

manual: mark specified host as a public address Recent work to have machine agents publish their machine addresses has caused a problem for the manual provider. The bootstrap node currently does not record the host/IP bootstrapped with as being public, and so any machine address that comes along may override it as being the "most public address". I have changed manual provisioning/bootstrap to mark the address we specified explicitly as being public. Fixes #1274018 https://code.launchpad.net/~axwalk/juju-core/lp1274018-manual-provider-addresses/+merge/203689 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 2

Patch Set 2 : manual: mark specified host as a public address #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -14 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
A environs/manual/addresses.go View 1 1 chunk +23 lines, -0 lines 0 comments Download
A environs/manual/addresses_test.go View 1 1 chunk +37 lines, -0 lines 0 comments Download
A environs/manual/export_test.go View 1 1 chunk +8 lines, -0 lines 0 comments Download
M environs/manual/provisioner.go View 1 1 chunk +1 line, -1 line 0 comments Download
M environs/manual/suite_test.go View 1 1 chunk +1 line, -1 line 0 comments Download
M instance/address.go View 1 1 chunk +3 lines, -0 lines 0 comments Download
M provider/null/instance.go View 1 1 chunk +1 line, -11 lines 0 comments Download
M provider/null/suite_test.go View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3
axw
Please take a look.
10 years, 2 months ago (2014-01-29 09:52:10 UTC) #1
wallyworld
LGTM but it seems we would want a test to ensure the correct IP address ...
10 years, 2 months ago (2014-01-30 02:20:01 UTC) #2
axw
10 years, 2 months ago (2014-01-30 03:23:08 UTC) #3
Please take a look.

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

https://codereview.appspot.com/56310044/diff/1/environs/manual/provisioner.go...
environs/manual/provisioner.go:258: logger.Infof("addresses for %v: %v",
hostname, addrs)
On 2014/01/30 02:20:01, wallyworld wrote:
> The above block of code is pretty much duplicated in null/instance.go, but the
> version here is missing the comment. Is it worth extracting to a shared
> function.

I've made a common environs/manual.HostAddresses function. This calls
instance.HostAddresses and then sets the last address to be public. I've added a
test to environs/manual.

> How do we know the last address is the public one?

Only because that's how instance.HostAddresses works now. I've updated the doc
comment for HostAddresses to make it part of the contract; there's already a
test in instance/address_test.go.
Sign in to reply to this message.

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