~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
..
agent 1409.2.2 10 years ago John Arbash Meinel Turn environs/agent into a top level agent/ packag Diff
bzr 1104.1.1 11 years ago Gustavo Niemeyer bzr: add package to handle Bazaar branches Diff
cert 734.5.14 11 years ago Roger Peppe add cert package Diff
charm 11 12 years ago Gustavo Niemeyer Applied the juju/charm renaming to the Go code bas Diff
cloudinit 25.2.1 12 years ago Roger Peppe add cloudinit package Diff
cmd 37.3.14 12 years ago William Reade hefty rearrangement, few actual changes Diff
constraints 1010.3.1 11 years ago Benji York checkpoint: tests pass; major refactoring to avoid Diff
container 1263.2.25 10 years ago Tim Penhey Merge prev pipe. Diff
doc 773.7.1 11 years ago William Reade added some draft documentation Diff
downloader 358.2.4 11 years ago Roger Peppe downloader: first test passes Diff
environs 25.5.4 12 years ago Roger Peppe rename environ->environs Diff
errors 1242.1.1 10 years ago Ian Booth Move common errors to erros package and remove dup Diff
etc 2303.2.1 10 years ago JuanJo Ciarlante add etc/bash_completion.d/juju-core Diff
instance 1274.1.3 10 years ago Tim Penhey Move environs.Instance into its own package. Diff
juju 37.3.14 12 years ago William Reade hefty rearrangement, few actual changes Diff
names 1548.3.1 10 years ago Dimiter Naydenov names: new package Diff
provider 1657.3.1 10 years ago Roger Peppe move environs/provider to provider Diff
replicaset 2177 10 years ago Tarmac [r=jameinel] Just moving juju-core/environs/replic Diff
rpc 766.2.1 11 years ago Roger Peppe rpc: initial commit Diff
schema 1 12 years ago Gustavo Niemeyer Bootstrapped package. Diff
scripts 980.1.1 11 years ago Dave Cheney renamed contrib to scripts Diff
state 525.1.1 11 years ago Roger Peppe mstate: rename to state Diff
store 882.1.5 11 years ago John Arbash Meinel Merge trunk resolve series parameter conflict. Diff
testing 83.1.2 12 years ago William Reade renamed testutils; broke it in anticipation of goz Diff
thirdparty 623.3.1 11 years ago Roger Peppe environs: add PasswordHash and RandomBytes Diff
tools 1603.7.4 10 years ago Ian Booth Pull out Tools struct to its own package Diff
upgrades 2304.2.1 10 years ago Ian Booth Initial upgrade framework Diff
upstart 152.5.1 11 years ago William Reade first cut, untested Diff
utils 1151.1.1 11 years ago Tim Penhey Trivial rename of trivial -> utils. Diff
version 124.2.2 12 years ago Roger Peppe version: simplify Diff
worker 295.1.1 11 years ago Dave Cheney service => worker Diff
.bzrignore 2397.3.1 10 years ago Ian Booth Merge trunk 148 bytes Diff Download File
.lbox 269.4.7 11 years ago William Reade whoops: readd .lbox 30 bytes Diff Download File
File .lbox.check 1868.1.1 10 years ago Roger Peppe environs/storage, state/statecmd: reenable tests 572 bytes Diff Download File
CONTRIBUTING 2618.1.1 10 years ago John Arbash Meinel Merge 1.18 r2271 and resolve all the conflicts. T 8.6 KB Diff Download File
dependencies.tsv 2638.1.2 10 years ago Roger Peppe remove loggo/loggo import; update dependencies.tsv 1.5 KB Diff Download File
dependencies_test.go 2289.1.4 10 years ago Tim Penhey Add a test for the dependecnies file. 851 bytes Diff Download File
LICENCE 703.1.1 11 years ago Dave Cheney + LICENCE 33.7 KB Diff Download File
Makefile 2559.3.1 10 years ago Jesse Meek Don't check for rsyslog-gnutls. Do check for juju- 2.1 KB Diff Download File
README 2303.2.6 10 years ago JuanJo Ciarlante doc touches, and a minor fix for _juju_completion_ 4.7 KB Diff Download File