Commit Graph
1279 Commits
Author SHA1 Message Date
Matthias Radestock 44a4dd9888 cosmetic: go vet 2015-03-26 18:36:00 +00:00
Bryan Boreham 7a4a88aeb9 Remove unused unnamed second item in ranges 2015-03-26 18:04:57 +00:00
Matthias Radestock 15fdcae25a Merge remote-tracking branch 'upstream/master' 2015-03-26 14:22:37 +00:00
Matthias Radestock 45740b1419 refactor: replace buf.WriteString(fmt.S*(...)) with fmt.F*(&buf,...)
shorter and more efficient
2015-03-26 14:20:28 +00:00
rade 0e54ca8c2b Merge pull request #490 from errordeveloper/master
Updates to Vagrantfile
2015-03-26 13:57:32 +00:00
Matthias Radestock e7335f361c refactor: move a func that is only used in testing 2015-03-26 13:53:09 +00:00
Matthias Radestock b83f4c9ee9 gofmt 2015-03-26 13:31:11 +00:00
Matthias Radestock 31efd76797 eliminate potential deadlock/dealy in connection.Shutdown
Treat the no-error case the same as the error case...
- use the standard sendAction to communicate with the actor, which
  ensures that we don't block when the actor has terminated
- run in a goroutine to prevent delaying the caller when the actor's
  channel is backed up.
2015-03-26 13:25:23 +00:00
rade dbe39659c5 Merge pull request #489 from awh/gofmt
gofmt
2015-03-26 12:46:15 +00:00
Ilya Dmitrichenko 96efc16432 Add missing aufs-tools to get rid of dubious log message -
[warning]: couldn't run auplink before unmount: exec: "auplink": executable file not found in $PATH
2015-03-26 11:24:45 +00:00
Ilya Dmitrichenko e37be3da97 Bump version of Go on Vargant dev VM 2015-03-26 11:24:45 +00:00
Adam Harrison efb7c0f1bc gofmt 2015-03-26 10:54:46 +00:00
Adam Harrison 066d8001dd Merge pull request #482 from rade/475-simplify-actors
simplify actors
2015-03-25 11:58:41 +00:00
Matthias Radestock ee6325d488 get rid of Interaction
it's no longer needed in the closure-based actor method scheme
2015-03-25 05:14:17 +00:00
Matthias Radestock 0e43a30858 convert MDNSClient actor to use closures for methods
We use a 'nil' closure to indicate shutdown.
2015-03-25 05:14:17 +00:00
Matthias Radestock a06797dd95 convert ConnectionMaker actor to use closures for methods 2015-03-25 05:14:17 +00:00
Matthias Radestock f0731f5d52 convert Routes actor to use closures for methods 2015-03-25 05:14:17 +00:00
Matthias Radestock c54b3bcacf convert LocalPeer actor to use closures for methods 2015-03-25 05:14:17 +00:00
Matthias Radestock 48c73598c4 convert the connection actor to use closures
The only slight trickiness is Shutdown. Generally connections shut
down when an error is encountered, but we also need to be able to shut
down connections w/o an error. Rather than making all the actor
methods return a (terminated bool, error) tuple, we signal the
non-error shutdown by sending nil as the action (instead of a
closure).
2015-03-25 05:14:17 +00:00
Michael Bridgen 60f50cb2e6 Merge branch 'pr429' 2015-03-24 17:03:22 +00:00
Michael Bridgen 075d9a007c Merge branch 'weave-225' of https://github.com/inercia/weave into pr429 2015-03-24 16:47:38 +00:00
Matthias Radestock 8c3b161bd3 cosmetic 2015-03-24 14:41:20 +00:00
Matthias Radestock 7bd0f7dbae don't modify state in ConnectionMaker.String
it's just wrong
2015-03-24 14:24:22 +00:00
Alvaro Saurin 9dcec8ca16 basic DNS cache
unit tests
2015-03-24 12:44:01 +01:00
Bryan Boreham 0bcadb1e4e Merge pull request #476 from rade/445-accumulate-gossip
LGTM.  Fixes #445.
2015-03-24 11:43:01 +00:00
rade 70a824ea07 Merge pull request #477 from awh/fix_how_it_works_doc
Add outbound and established flags to connection structure diagram
2015-03-24 11:36:18 +00:00
Adam Harrison d7959d8ca5 Add outbound and established flags to connection structure diagram 2015-03-24 11:33:24 +00:00
Matthias Radestock aa1dd47bd2 accumulate gossip data until it can be sent
Introduce an intermediary - GossipSender - between GossipChannel and
Connection. This accumulates gossip data (now represented by the new
GossipData interface) from the former until it can be passed onto the
latter, allowing the former to proceed when the latter may be blocked
on i/o.

This

1) prevents deadlocks that arise from cycles in the communication
topology

2) improves performance by allowing GossipChannel and its calling code
to proceed when connection i/o is blocked

3) improves performance by accumulating GossipData - the accumulated
data often is considerably more compact than the sum of all the
accumulated bits, and it is transmitted in a single communication
event.

In order to support accumulation, the GossipData interface has a Merge
method. Furthermore, encoding is deferred until the data can actually
be sent, since accumulation would be hard/impossible to encoded
data. This required changes on some interfaces, most notably Gossiper.

The implementation of GossipData for topology gossip is
TopologyGossipData. It carries a reference to Peers and a set of
PeerNames, indexing into Peers and referencing the Peer entries which
have changed. Previously updates were represented as a list of Peer
entries. The indirection via PeerNames allows Encode to omit entries
which have been removed. The change in representation required changes
to the signature of some methods on Peers.

Note that all the above only applies to the "periodic gossip" portion
of the Gossiper API, which topology gossip in fact uses for *all*
gossip. GossipUnicast and GossipBroadcast are unchanged, but could
conceivably receive the same treatment in the future.

Fixes #445.
2015-03-23 23:23:15 +00:00
Michael Bridgen f64876a64b Increment the server port for each test
Occasionally the test servers overlap and the test will fail with
"address already in use".
2015-03-23 12:02:43 +00:00
Matthias Radestock e096b3bcd1 ignore weavexec/weave build artifact 2015-03-21 13:08:00 +00:00
rade 8e65c7127d Merge pull request #388 from squaremo/remote_weaving
Move weave script into tools image with its deps
and thus enable weaving on a remote docker

Closes #312.
2015-03-20 15:17:09 +00:00
Michael Bridgen 520c54f8da Use a fixed (and old) version of the docker client
As noted in #388 comment 76958961, we need the docker client to be as
old as possible while supporting what weave needs to do. At the minute
that means version 1.3.1.

The `apk` package index does not have old versions of docker, so the
most direct way of getting a docker executable is to download the
specific version from https://get.docker.com.
2015-03-20 14:37:24 +00:00
Michael Bridgen 93f16d91ce Run weave run with the local docker
We want to be compatible with whatever docker the user has; `weave
run` is the only command that passes on arbitrary args to docker
(i.e., that doesn't have a fixed set of docker features that it
needs).

To make this workable we still need to do some things on the remote
host: the IP attachment and figuring out the DNS settings (since those
may depend on the bridge IP).
2015-03-20 14:37:24 +00:00
Matthias Radestock 2b5e2db550 cosmetic - move comment to correct place 2015-03-19 17:43:28 +00:00
Matthias Radestock 9bd695a816 restore workingness of smoketests sans vagrant
Fixes #456.
2015-03-19 17:23:29 +00:00
rade 39e7871cf7 Merge pull request #472 from bboreham/master
Add peer nickname to JSON status
2015-03-19 12:15:16 +00:00
Bryan Boreham 3fbb6eaa8d Add peer nickname to JSON output 2015-03-19 11:34:01 +00:00
Michael Bridgen 84ce0663f8 Don't show env entries in command
The form of `docker -e` without an equals sign passes them along from
the environment without the value appearing in the command.
2015-03-19 10:15:06 +00:00
Michael Bridgen 9fd468d743 Use weave remotely in smoke tests instead of via SSH 2015-03-19 10:15:06 +00:00
rade 6b64516ede Merge pull request #465 from awh/237_add_dns_to_weave_status
Include weave dns information in `weave status`

Closes #237.
2015-03-18 22:21:11 +00:00
Adam Harrison fcab4ee239 Truncate container IDs to twelve characters 2015-03-18 17:56:58 +00:00
Adam Harrison 2e7c281b46 Weave status returns success irrespective of whether router or DNS up 2015-03-18 16:46:51 +00:00
Adam Harrison 6c5dbe0d01 Address documentation comments 2015-03-18 14:57:29 +00:00
Adam Harrison 0005715b1a Weave status only returns success if both router and DNS are up 2015-03-18 14:49:48 +00:00
Adam Harrison 66f4fd94e3 Update documentation 2015-03-18 13:39:16 +00:00
Adam Harrison 0aa36cf8d0 Try to get weaveDNS status even if router container is missing 2015-03-18 13:39:08 +00:00
Michael Bridgen 795d0edc73 weavetools -> weaveexec
This is to make a visible break with previous releases, such that a
newly downloaded weave script will definitely work.

Without this change in name, an existing weavetools image that doesn't
include the script might be invoked, resulting in a confusing message
for the user.
2015-03-18 12:29:20 +00:00
Michael Bridgen 959c46b62a Version the weavetools image run remotely 2015-03-18 12:29:20 +00:00
Michael Bridgen b9353cdee4 Mention using weave remotely in readme 2015-03-18 12:29:19 +00:00
Michael Bridgen 019eeab896 Pass environment variables to remote invocations 2015-03-18 12:29:19 +00:00