Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore Link Local Addresses #627

Merged
merged 4 commits into from Sep 1, 2014
Merged

Conversation

jameinel
Copy link
Member

This addresses 3 different issues, I can split them up if requested, but it is easiest to just land them together.

  1. Race condition in aggregate_test.go. It had an assumption that:
    go funcA()
    go funcB()
    would always call funcA before funcB. (Because the result list was a fixed response, and the processing code doesn't do any mapping of result ids to actual request ids.)
    There was a fair bit in other tests that only really worked by happenstance, so I cleaned them up as well.

  2. Add some Trace level logging about why 2 address lists don't match. I've seen a bunch of log entries that say "updating machine addresses" when nothing appears to have actually changed.

I can just shelve this, and instead only test manually and see if I find a fix, but I figure that trace level logging is cheap.

  1. Actually fix bug #1362453 which is that when looking at Machine addresses, we include their LinkLocal address. Which isn't a useful address in any sense. And right now both PrivateAddress and PublicAddress take care to filter them out. However I thought it might be part of why (2) is getting confused, and certainly in the past I was seeing them end up in the list of APIHostPorts which is a bit silly (there is no reason to say that you can connect to a machine on its LinkLocal address.)

The code assumed that 'go a(); go b()' would always call a() first, but that isn't
guaranteed by the runtime.
There was a bunch of other code that happened to work because of bad assumptions, so
I went around and cleaned them up (it assumed that it was ok for results to be of length
100 when making a request for 10 ids, which only worked because the aggregation code looped
over the input rather than looping over the result of the request).
…why the

machine address updater keeps saying that it is updating addresses with values that haven't changed.
When storing the addresses of a Machine, we won't ever want to use the ScopeLinkLocal addresses,
both PublicAddress and PrivateAddress will explicitly filter them out, and they just confuse things
when dealing with addresses (at one point they were candidates for Clients to try to connect to
the API server).
@@ -34,6 +35,9 @@ type testInstance struct {

var _ instance.Instance = (*testInstance)(nil)

func (t *testInstance) Id() instance.Id {
return t.id
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a blank line after (we might use "o" for this (vim shortcuts), like we use "d" for Delete this line :)

@dimitern
Copy link

dimitern commented Sep 1, 2014

LGTM, thanks for doing this! Just a couple of comments.

@jameinel
Copy link
Member Author

jameinel commented Sep 1, 2014

$$merge$$

@jujubot
Copy link
Collaborator

jujubot commented Sep 1, 2014

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

jujubot added a commit that referenced this pull request Sep 1, 2014
Ignore Link Local Addresses

This addresses 3 different issues, I can split them up if requested, but it is easiest to just land them together.

1) Race condition in aggregate_test.go. It had an assumption that:
  go funcA()
  go funcB()
would always call funcA before funcB. (Because the result list was a fixed response, and the processing code doesn't do any mapping of result ids to actual request ids.)
There was a fair bit in other tests that only really worked by happenstance, so I cleaned them up as well.

2) Add some Trace level logging about why 2 address lists don't match. I've seen a bunch of log entries that say "updating machine addresses" when nothing appears to have actually changed.

I can just shelve this, and instead only test manually and see if I find a fix, but I figure that trace level logging is cheap.

3) Actually fix bug #1362453 which is that when looking at Machine addresses, we include their LinkLocal address. Which isn't a useful address in any sense. And right now both PrivateAddress and PublicAddress take care to filter them out. However I thought it might be part of why (2) is getting confused, and certainly in the past I was seeing them end up in the list of APIHostPorts which is a bit silly (there is no reason to say that you can connect to a machine on its LinkLocal address.)
@jujubot jujubot merged commit 4e0bc0d into juju:master Sep 1, 2014
@jameinel jameinel deleted the ignore-link-local-1362453 branch December 13, 2016 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants