juju/juju — pull request #627 by jameinel (2014-08-28 13:23:46+00:00)
Title: 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.)