Commit Graph
1421 Commits
Author SHA1 Message Date
Alex Bligh 12d88eac23 Add options to set ports on weaver command line
This commit adds two command line options, intended to allow multiple
instances of weave to run without container separation between them.

* -port=PORT makes weave bind to port PORT (an integer). Without the
  option, the default value (6783) is used.

* -httpaddr=ADDRESS makes weave bind its control interface to
  a different address. For instance "127.0.0.1:6784" can be used to
  bind to localhost only. An absent address element makes it bind to
  all interfaces. ":6784" is the default. An empty string
  can be used to disable the control interface.

Signed-off-by: Alex Bligh <alex@alex.org.uk>
2015-04-10 12:09:13 +01:00
David Wragg bb9e26b4ae Merge pull request #528 from 'bboreham/name_change' 2015-04-10 08:03:38 +01:00
rade ff657d1512 Merge pull request #533 from abligh/fix-dockerless-ip-address
Fix dockerless.txt
2015-04-09 21:45:38 +01:00
Alex Bligh 26d9c37dd2 Fix dockerless.txt
The IP address for VM1 is 192.168.122.2/24. 192.168.122.1/24 is virbr0.
2015-04-09 21:11:18 +01:00
Bryan Boreham 642cc3f00e Change release GitHub user name from zettio to weaveworks 2015-04-09 17:32:36 +01:00
Bryan Boreham a4fd0b571d Row back on Docker image names until we do a release under the weaveworks name 2015-04-09 11:46:08 +01:00
Bryan Boreham 067ba6d970 Fix all zettio.github.io links too 2015-04-09 11:39:55 +01:00
Bryan Boreham cec1efbcef Merge pull request #530 from rade/529_eliminate_connection_add_remove_race
Very subtle, but it looks ok to me.  Fixes #529
2015-04-09 10:36:27 +01:00
Matthias Radestock e639007b62 eliminate AddConnection/RemoveConnection race
We were invoking AddConnection in a separate goroutine, and this could
result in RemoveConnection getting invoked first, resulting in bogus
entries in our connection map, which would effectively prevent
connectivity to the other peer until the stale entry got removed
through a lost tie break. And if, per chance, the remote end ran into
exactly the same race condition, then connectivity between that peer
and ourself was broken permanently.

Hitting this race condition required a combination of a) no UDP
heartbeat being received for HeartbeatTimeout(30s) - this causes the
actorLoop to terminate and RemoveConnection to be invoked, and b) the
AddConnection invocation getting delayed for at least that long.
2015-04-09 06:34:35 +01:00
Matthias Radestock 56f5c749e1 optimise broadcast route calculation
...by obtaining our connection set just once. This also guards against
potential locking issues, since we no longer obtain the required
lock on our local peer while holding a lock on Peers.

Note that this change means the connection list can be out of date by
the time we enter Peers.ForEach. However, previously it was possible
for the list to change for each peer we are iterating over. So it's
just a different flavour of out-of-dateness.
2015-04-08 21:54:45 +01:00
Matthias Radestock ec30bdaf3d explain kernel settings that need changing 2015-04-08 18:33:39 +01:00
David Wragg 74dae2abb4 Allow multiweave to be run from any directory 2015-04-08 18:16:10 +01:00
Bryan Boreham 8a82f368d0 Update repository name from zettio to weaveworks 2015-04-08 16:35:52 +01:00
Tom Wilkie 580ffc4fa4 Repoint Travis and Coveralls badges in readme 2015-04-08 12:42:28 +01:00
Bryan Boreham 86abc6ac2b Merge pull request #516 from rade/514_lower_topology_gossip_complexity
LGTM.  Closes #514
2015-04-07 15:00:39 +01:00
Matthias Radestock f80410bf59 switch to gossip broadcast for topology updates 2015-04-06 14:17:23 +01:00
Matthias Radestock f4416bfadc introduce Routes.EnsureRecalculated
A means to ensure that any preceeding route recalculation requests
have been processed. It's akin to a global promise.
2015-04-06 14:17:23 +01:00
Matthias Radestock 6bc660068f use GossipSender for GossipBroadcast
This makes GossipBroadcast properly async.
2015-04-06 14:17:23 +01:00
Matthias Radestock 8a2828d57d add "representation of received update" to return of Peers.ApplyUpdate 2015-04-06 14:17:23 +01:00
Matthias Radestock a58eb6ba7d make gossip broadcast operate on GossipData 2015-04-06 14:00:51 +01:00
Matthias Radestock 9b9d8a03aa refactor: make Peer.Connections() return a set instead of a slice
This is more flexible since it allows callers to perform efficient
lookups on the result.
2015-04-06 13:57:13 +01:00
rade fe4d8b7767 Merge pull request #518 from rade/canonical_sets
canonical sets
2015-04-06 13:29:03 +01:00
Matthias Radestock e8e9a43abd tired of typing "struct{}{}" 2015-04-06 11:53:51 +01:00
Matthias Radestock 6db12d682e make PeerNameSet a more broadly used type 2015-04-06 11:45:17 +01:00
Matthias Radestock 74b3f8d44e use map[...]struct{} for sets instead of map[...]bool
See https://groups.google.com/d/msg/golang-nuts/lb4xLHq7wug/MhrSLkyS4F8J

We don't really care about the performance aspect of this, but using
struct{}{} values is in some way canonical since it means the
representation carries no redundant information.
2015-04-06 11:35:11 +01:00
Matthias Radestock 6f2f25aca5 don't complain in weave status about weavedns absence/errors
it's tiresome to see this when weavedns isn't running
2015-04-05 18:50:17 +01:00
Matthias Radestock 80aa60b3ab separate multiweave 'launch' and 'connect' phases 2015-04-05 17:04:43 +01:00
Matthias Radestock 624373ace2 simplify 2015-04-05 17:03:18 +01:00
Matthias Radestock 8c1015d2a4 cosmetic: consistent terminology in var names 2015-04-04 22:18:31 +01:00
Matthias Radestock 4ebbdabfa1 never, ever use 10.0 for anything
it has a high probability of conflicting
2015-04-04 22:00:06 +01:00
Matthias Radestock 95c1e226f0 use routes based on tcp overlay connectivity for gossip
i.e. include asymmetric and non-established connections
This is TRTTD since gossip flows over the tcp overlay.
2015-04-04 21:56:30 +01:00
Matthias Radestock 3fba123bc0 comment 2015-04-04 21:14:25 +01:00
Matthias Radestock b272dcf8c1 rename: less 'gossip' in gossip 2015-04-04 20:58:10 +01:00
Matthias Radestock 91ed22a953 refactor(ish): generalise an abstraction
LocalPeer.NextBroadcastHops -> ConnectionsTo
thus separating the computation of who we want to connect to from
obtaining the associated Connections
2015-04-04 20:36:48 +01:00
Matthias Radestock bcd2a0184c small refactor 2015-04-04 20:08:38 +01:00
Matthias Radestock 45fd750318 cosmetic: move some test helpers from test code into main code
since they reach quite deeply into the data structures
2015-04-04 20:02:22 +01:00
Matthias Radestock 0a02d1a926 cosmetic: rename a type 2015-04-04 20:02:01 +01:00
Matthias Radestock ac0788cb5a simplify test router creation 2015-04-04 19:50:19 +01:00
Matthias Radestock 683caef866 tweak comment 2015-04-04 19:46:47 +01:00
Matthias Radestock fa5279ab3e cosmetic 2015-04-04 16:02:01 +01:00
Matthias Radestock 6cda74d49f refactor: inline 2015-04-04 15:36:42 +01:00
Matthias Radestock 582b582b98 fix silly bug 2015-04-03 19:52:28 +01:00
Matthias Radestock fdea7d93f9 refactor: improve abstraction in connection gossip handling
- turn previously free-floating functions into methods on GossipChannel
- move gossip message type dispatch from connection into router
2015-04-03 19:38:01 +01:00
Matthias Radestock 6f398a7459 refactor(ish): raise GossipSender abstraction level slightly 2015-04-03 18:33:59 +01:00
Matthias Radestock 7166d151aa make route calculcation more efficient and properly async
Instead of following the usual actor pattern, we use a 1-place channel
with a non-blocking send. Essentially, if there is already a pending
recalculation request queued up, there is no point enqueuing another
one.
2015-04-03 18:12:03 +01:00
Matthias Radestock acbb911823 Merge remote-tracking branch 'upstream/master' 2015-04-03 10:09:49 +01:00
Matthias Radestock 604d210e55 more flexibility 2015-04-03 10:07:39 +01:00
David Wragg 587a67d701 Comment
It's not blindingly obvious where this 'found' comes from.
2015-04-02 16:37:30 +01:00
Matthias Radestock 5648f87717 oops
broke this in 45740b1419
2015-04-02 13:03:42 +01:00
Matthias Radestock 488c5c5a2d bump default connection limit to 30
I can get 29 weaves running on my laptop, and once all connections are
established, the avg cpu load is ~10%. 30 runs into difficulty because
the concurrent connection establishment does create a very high load,
resulting in some timeouts. But that wouldn't happen when running each
weave in a separate machine (with more CPU resources overall than my
single laptop).

Stop gap solution for #426.
2015-04-02 12:38:45 +01:00