~axwalk/juju-core/lp1303195-manual-ubuntuuser-bash

[r=jameinel],[bug=1308487] state/api: save the connection as the first addr

When we connect to the API, we eventually will try all addresses listed.
We also will always save the value that we managed to connect with. This
change addresses bug #1308487, which has us move the address we
successfully connected to as the first server and address we should try
next time.

This doesn't quite give us a priority, because if we ever fail this one,
we'll go back to the default sort order except for one entry. However, I
think it still helps.

In my testing, I had to bump up the DialAddressInterval all the way up
to 500ms before we really wouldn't try most of the addresses. This is
because the time here *includes* the TLS handshake (though not the Login
round trip).

I would be happy to see the value bumped up a bit, but I don't have a
solid feeling for what is a great value there.
But since we always move the successful connection to the front, we
can expect that even if we wait a while to fall back, that will be the
uncommon case, as whatever address succeeded in the past is the most
likely to succeed the next time.

https://codereview.appspot.com/88470043/
Filename Latest Rev Last Changed Committer Comment Size
..
apiaddressupdater 2535.1.1 10 years ago Andrew Wilkins Introduce apiaddressupdater to unit and machine ag Diff
authenticationworker 2118.3.1 10 years ago Ian Booth Add machine agent worker to maintain ssh keys Diff
charmrevisionworker 2181.3.9 10 years ago Ian Booth Rework tests to account for upstream changes Diff
cleaner 1253.4.1 10 years ago Frank Mueller cleaner: implemented and integrated the cleaner Diff
deployer 765.4.1 11 years ago William Reade parallel Deployer implementation; replaces contain Diff
firewaller 295.2.1 11 years ago Frank Mueller worker: added firewaller with first integration of Diff
instancepoller 2237.1.1 10 years ago Ian Booth addressupdater renamed to instancepoller to gather Diff
localstorage 1775.2.8 10 years ago Andrew Wilkins Move provider/local/storage to worker/localstorage Diff
logger 1546.2.34 10 years ago Tim Penhey Merged logger-worker into logger-initial-state. Diff
machineenvironmentworker 2258.1.10 10 years ago Tim Penhey Test that the environment is set. Diff
machiner 794.7.1 11 years ago William Reade add and use machiner Diff
minunitsworker 1464.3.10 10 years ago Francesco Banconi Changes as per review. Diff
peergrouper 2179.4.1 10 years ago Roger Peppe worker/peergrouper: new package Diff
provisioner 279.1.1 11 years ago Dave Cheney service/provisioner: new package Diff
resumer 1279.4.1 10 years ago Frank Mueller resumer: initial implementation Diff
rsyslog 2353.3.1 10 years ago Andrew Wilkins Implement rsyslog worker Diff
singular 2520.1.1 10 years ago Roger Peppe worker/singular: new package Diff
terminationworker 1994.1.2 10 years ago Andrew Wilkins provider/null: implement Environ.Destroy A new wo Diff
uniter 325.2.3 11 years ago William Reade move relationer to uniter Diff
upgrader 1384.3.1 10 years ago John Arbash Meinel Start working out an upgrader worker. From the gr Diff
environ.go 2437.8.36 10 years ago Michael Foord Testing that InstanceId errors are handled 3.4 KB Diff Download File
environ_test.go 2437.8.41 10 years ago Michael Foord fmt 4.4 KB Diff Download File
export_test.go 1718.1.1 10 years ago Roger Peppe worker: fix non-nil interface bug 467 bytes Diff Download File
notifyworker.go 1718.1.1 10 years ago Roger Peppe worker: fix non-nil interface bug 2.5 KB Diff Download File
notifyworker_test.go 2412.1.1 10 years ago Jesse Meek Change checkers import path change all imports of 9.3 KB Diff Download File
runner.go 2639.2.7 10 years ago Tim Penhey More fixes. 6.9 KB Diff Download File
runner_test.go 1847.1.9 10 years ago Tim Penhey Make the tests pass. 11.4 KB Diff Download File
simpleworker.go 2344.4.3 10 years ago Nate Finch minor review changes 1.3 KB Diff Download File
simpleworker_test.go 2344.4.3 10 years ago Nate Finch minor review changes 983 bytes Diff Download File
stringsworker.go 1718.1.1 10 years ago Roger Peppe worker: fix non-nil interface bug 2.1 KB Diff Download File
stringsworker_test.go 2412.1.1 10 years ago Jesse Meek Change checkers import path change all imports of 8.8 KB Diff Download File