Commit Graph
1448 Commits
Author SHA1 Message Date
Matthias Radestock 39b9034fef there is no need for multiweave to use --local 2015-04-11 00:18:42 +01:00
Matthias Radestock 363814db5c simplify "need to run as root" condition 2015-04-11 00:07:23 +01:00
rade c2042d52f8 Merge pull request #545 from rade/errordeveloper-issue_540
Only check kernel version and ip command in local mode

Fixes #540. Closes #542.
2015-04-10 23:03:03 +01:00
Ilya Dmitrichenko 35d32bd03a Only check kernel version and ip command in local mode (close #540) 2015-04-10 23:01:59 +01:00
Matthias Radestock 8fcd56bc68 Merge branch 'bboreham-543-fix-fieldvalidator'
Fixes #543.
2015-04-10 22:43:26 +01:00
Bryan Boreham d228a4450a Make sure FieldValidator methods act on the object we pass in.
Added a unit test for FieldValidator
2015-04-10 22:42:40 +01:00
Matthias Radestock d19d485d39 refactor: make LocalPeer.Router "private"
nothing outside LocalPeer should access it
2015-04-10 21:56:00 +01:00
David Wragg 7d51f8751b gofmt 2015-04-10 20:55:27 +01:00
rade 551c1d2925 Merge pull request #541 from abligh/support-unix-domain-control-socket
Support using a unix domain socket for the HTTP control interface.
2015-04-10 20:39:11 +01:00
Alex Bligh 9699b4ce1a Support using a unix domain socket for the HTTP control interface.
When running multiple weaver daemons it is convenient for the HTTP
control interface to bind to a UNIX domain socket, to avoid the
need to allocate an additional unique port. This commit adds the
ability to specify
   httpaddr="/path/to/socket"
on the command line.

Signed-off-by: Alex Bligh <alex@alex.org.uk>
2015-04-10 20:18:27 +01:00
rade 3a83570005 Merge pull request #526 from bboreham/extend-ps
Allow container names/ids to be supplied to `weave ps`
2015-04-10 15:57:53 +01:00
Matthias Radestock f88ce6e798 don't mention defaults twice in usage
go's flag package already shows the default values, so we only need to
mention them when they are determined later.
2015-04-10 15:38:11 +01:00
Matthias Radestock 0799d9f70b shorten connection timeout for http interactions with containers
This issue came to light in the context of `weave launch`. When the
weaver container died after we've completed network configuration, it
would take a minute for the script to terminate, due to `curl` being
stuck in a connection attempt.

Fixes #538.
2015-04-10 15:33:11 +01:00
rade db302a0d3d Merge pull request #539 from abligh/make-iface-mandatory
Error if neither -iface or -name is specified
2015-04-10 15:22:07 +01:00
Alex Bligh 24bd7151e2 Error if neither -iface or -name is specified
This prevents a nil pointer dereference if (e.g.) weaver is
invoked with no arguments.

Signed-off-by: Alex Bligh <alex@alex.org.uk>
2015-04-10 15:14:51 +01:00
Bryan Boreham 10bd84a460 Document name-list option to weave ps 2015-04-10 15:08:35 +01:00
rade 0540e41ffd Merge pull request #537 from bboreham/master
Simplify printing
2015-04-10 14:51:30 +01:00
Bryan Boreham d32f328c24 Simplify printing 2015-04-10 14:46:31 +01:00
rade c13980af4b Merge pull request #536 from dpw/535-golang142
Docker needs golang 1.4.2 to build, so we do too

Fixes #535.
2015-04-10 14:10:46 +01:00
rade bd8cb02f17 Merge pull request #534 from abligh/select-ports-on-cli
Add options to set ports on weaver command line
2015-04-10 13:54:41 +01:00
David Wragg 162b056784 Docker needs golang 1.4.2 to build, so we do too 2015-04-10 12:45:27 +01:00
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
Matthias Radestock f3d20111d8 eliminate dependency on LocalPeer.Router
(from things outside LocalPeer)
2015-04-10 10:51:40 +01:00
Bryan Boreham 2ba8f34132 Merge pull request #521 from rade/517_lower_topology_periodic_gossip_complexity
LGTM.  Closes #517
2015-04-10 10:08:23 +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
Matthias Radestock 12c97b4fc5 topology-sensitive random selection of gossip neighbours 2015-04-09 18:10:57 +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
Matthias Radestock f5362289cf switch to a more efficient GC for gossip senders 2015-04-09 11:44:13 +01:00
Matthias Radestock 40d127d9a4 make connection heartbeating independent of periodic gossip
This was a convenient but rather suspect coupling. In particular, it
will break if the period gossip logic changes s.t. it no longer sends
gossip on all connections every interval.
2015-04-09 11:44:13 +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
Bryan Boreham 13f3439a06 Allow container names to be supplied to 'weave ps' 2015-04-08 15:38:23 +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