Matthias Radestock
339f85cbcb
get rid of Router.NormalisePeerAddr
...
There was only one call site left and it always gets invoked with an
ip:port, so normalisation is a no-op.
Also remove mysterious comment.
2015-04-15 11:44:48 +01:00
Matthias Radestock
290d5443cc
more discriminate connectivity
...
If a peer was specified on the command line w/o a port, then do not
connect to it if we have inbound connections from that IP.
This eliminates unnecessary (and ultimately failing) connection
attempts in the common scenario of several peers having been told
about each other on their command lines.
We represent a command line peer address with a TCPAddr, which avoids
back and forth conversion to string and extra fields to carry the "did
the original include a port?" information.
2015-04-15 11:42:53 +01:00
rade
9bd2afc6c3
Merge pull request #560 from rade/include_remote_address_in_connection_logging
...
always include the remote address in connection log entries
tidy up / declutter some log and status output
2015-04-15 11:23:26 +01:00
Matthias Radestock
9478696d1a
update example output in docs
2015-04-15 11:17:30 +01:00
Matthias Radestock
5415e3a60a
drop "Peer " prefix in Peers section of status
...
it's redundant and the output looks much better w/o it
2015-04-15 11:09:35 +01:00
Matthias Radestock
f0998d6196
declutter status' reconnects section
2015-04-15 10:56:29 +01:00
Matthias Radestock
f6def13ea9
change style for connections in status' reconnects section
...
to match how they are shown in the logs
2015-04-15 10:55:14 +01:00
Matthias Radestock
b1fd1334b4
always include the remote address in connection log entries
...
in addition to the peer name
This is handy for debugging, especially in situations when there are
multiple connections in flight to the same peer.
2015-04-14 22:14:29 +01:00
Matthias Radestock
74b3bf8299
pass on args in multiweave launch <args>...
2015-04-14 19:22:01 +01:00
Matthias Radestock
f9ea3f54d1
Merge branch 'bboreham-make-tests-stop'
...
Closes #557
2015-04-14 18:03:42 +01:00
Bryan Boreham
8c6c14c6d3
Accumulate any errors from go test commands so we can report overall status
2015-04-14 18:03:10 +01:00
Matthias Radestock
31775a8b84
cosmetic
2015-04-14 17:58:13 +01:00
Matthias Radestock
973996184d
fix bug
2015-04-14 13:27:10 +01:00
Bryan Boreham
d334b903e4
Merge pull request #556 from rade/do_not_duplicate_router_config
...
LGTM
2015-04-14 12:58:05 +01:00
Matthias Radestock
798bfeb0a7
make the Router include the RouterConfig
...
rather than copying the bulk of it
2015-04-14 11:39:11 +01:00
rade
9b29d2ecc5
Merge pull request #554 from dpw/main-routerconfig
...
Pull forward the declaration of the RouterConfig in main()
2015-04-14 10:57:43 +01:00
Matthias Radestock
961801b792
refactor: shrink function by extracting helpers
2015-04-14 06:49:47 +01:00
David Wragg
ae00582212
Reintroduce a bufSzMB variable
2015-04-13 22:29:19 +01:00
David Wragg
1213935030
Pull forward the declaration of the RouterConfig in main()
...
This eliminates a few variables, and the naming awkardness where we
have corresponding but distinct flag and router config variables.
2015-04-13 21:39:15 +01:00
Matthias Radestock
c2972b7558
cosmetic: remove dead code
2015-04-13 21:28:07 +01:00
rade
9833747fd9
Merge pull request #553 from dpw/makefile-cleanups
...
Makefile cleanups
2015-04-13 21:05:32 +01:00
David Wragg
1328f8bec7
Use $(@D) rather than $(shell dirname $@)
2015-04-13 20:50:50 +01:00
David Wragg
433d406d83
Use $(@D) rather than $(shell dirname $@)
2015-04-13 20:39:01 +01:00
David Wragg
bc9bb9e4ae
tempfile is a deprecated debianism
...
As noted in its man page.
2015-04-13 20:37:12 +01:00
Matthias Radestock
805005e632
weave status no longer complains about missing weaveDNS
2015-04-13 18:28:52 +01:00
Matthias Radestock
202f536e07
refactor: extract some helpers in order to shrink main()
2015-04-13 16:03:49 +01:00
Matthias Radestock
b062facbe9
refactor: inline
2015-04-13 15:56:52 +01:00
rade
a80b8eacac
Merge pull request #552 from bboreham/status-conn-errors
...
Allow ConnectionMaker to report the reason the connection broke
2015-04-13 15:46:09 +01:00
Matthias Radestock
8ab14ea1c6
don't crash
...
this got broken in a93a09dd35
2015-04-13 15:37:44 +01:00
Matthias Radestock
3db4e86564
remove established connections from ConnectionMaker state
...
This got broken in 6409a8647c
The issue is that for successful connections nothing ever sets
attempting=false, so we need some other means of removing such
entries.
2015-04-13 14:59:32 +01:00
Bryan Boreham
8ad244e0f9
Let ConnectionMaker report the reason the connection broke
2015-04-13 14:35:27 +01:00
Bryan Boreham
f8ec56ea79
Move connection shutdown logging into shutdown()
2015-04-13 14:21:11 +01:00
Adam Harrison
7f434d71e1
Merge pull request #532 from inercia/weave-225-fix-2
...
Fix in WeaveDNS: do not modify cache when getting a reply
2015-04-13 14:20:40 +01:00
Adam Harrison
29b3b91423
Merge pull request #501 from inercia/weave-225-fix-1
...
Fix for negative TTLs in WeaveDNS
2015-04-13 14:19:47 +01:00
Adam Harrison
01af41c837
Disable Vagrant 1.7 per host insecure key replacement
2015-04-13 11:43:01 +01:00
Adam Harrison
fe58a63996
Merge pull request #550 from rade/549_forget_as_given
...
remember user-supplied peer addresses as given
2015-04-13 10:38:52 +01:00
Matthias Radestock
a93a09dd35
remember user-supplied peer addresses as given
...
rather than post name resolution. This way we can forget them as given
even when name resolution has changed or fails.
2015-04-12 20:44:12 +01:00
Matthias Radestock
1275bb24e5
exclude stale info from ConnectionMaker.String()
...
This got broken in 7bd0f7dbae .
2015-04-12 12:23:32 +01:00
Matthias Radestock
6409a8647c
simplify connection logic slightly
...
There is no need to remove entries from cm.targets that are in
ourConnectedTargets. None of these targets will be in validTargets
(since addTarget filters anything in ourConnectedTargets), so they
will be removed a few lines further down anyway...
Unless the target is in the 'attempting' state. But that is ok, and in
fact desirable. Any such targets indicate connection attempts that are
in progress, which is something we display in `weave status` and want
to be accurate. Eventually the connection attempt will either succeed
or fail, and the cm.targets entry will be removed on the next run of
connectToTargets.
2015-04-12 12:11:27 +01:00
Matthias Radestock
21102d3615
refactor: extract router configuration
...
the param list of NewRouter was getting a bit long
2015-04-12 10:46:46 +01:00
Matthias Radestock
e89e3adc69
cosmetic: more consistent param/arg/var ordering re Port
2015-04-12 10:45:49 +01:00
Matthias Radestock
065b632f91
significantly reduce time for test dns servers to shut down
...
by setting the ReadTimeout to 100ms instead of the default 2s.
Closes #547 .
2015-04-11 20:52:51 +01:00
Matthias Radestock
e0bba10ead
better handling of test multicast listener initialisation errors
...
We handle that error explicitly in all cases and point out the common
cause, namely the absence of a default multicast interface.
Closes #481 .
2015-04-11 20:22:41 +01:00
Matthias Radestock
bb99b21248
tiny refactor: make use of helper function
2015-04-11 19:09:41 +01:00
Matthias Radestock
85971193a8
simplify check for --local
2015-04-11 17:58:26 +01:00
Matthias Radestock
59ae50eb4e
don't rely on docker inspect for determining container death
...
Docker can take a while to notice & record the death of containers, so
we perform a more direct check instead.
Fixes #522 .
2015-04-11 12:24:09 +01:00
Matthias Radestock
f433d26d1f
fix typo
2015-04-11 12:23:57 +01:00
rade
cd81101508
Merge pull request #546 from rade/awh-handle_signals_without_tty
...
Implement weaveexec signal proxy
Fixes the following issues with remote (i.e. w/o `--local`) execution of the weave script via a container, as per #507 :
1. stderr is merged into stdout
2. line termination with CRLF instead of LF
3. ctrl-c is ignored
Fixes #507 . Closes #523 .
2015-04-11 11:55:46 +01:00
Adam Harrison
338d577fb7
Implement weaveexec signal proxy
2015-04-11 11:50:42 +01:00
Matthias Radestock
39b9034fef
there is no need for multiweave to use --local
2015-04-11 00:18:42 +01:00