Commit Graph
207 Commits
Author SHA1 Message Date
Bryan Boreham 3cd1a17c23 IP Allocation Management
Using the Ring CRDT and Weave gossip, provides an interface
for the weave script to allocate IP addresses in `weave run`,
`weave start` and `weave expose`.

See docs/ipam.md for implementation details, and site/features.md
for user-visible changes.
2015-05-14 17:44:06 +01:00
Matthias Radestock c158b86dc6 refactor: shorten a method name 2015-05-14 15:13:10 +01:00
Matthias Radestock 03c1f49850 make profiling work again
The weave SIGINT signal handler was racing the profiler SIGINT signal
handler. So now we a) make the former return instead of exit, and b)
disable the latter, as a result of which the deferred profile.Stop in
weaver/main gets called.
2015-05-11 19:38:06 +01:00
Matthias Radestock 0cbbe9bac3 make Peer.String() return the common case
When we want a string representation of a Peer, we nearly always just
want the full name. So make String() return that and introduce Info()
to return expanded info.
2015-05-10 23:58:23 +01:00
Alvaro Saurin f723d5afd8 Move the router to the new signals handler 2015-05-06 15:07:36 +02: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
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 202f536e07 refactor: extract some helpers in order to shrink main() 2015-04-13 16:03:49 +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 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 f433d26d1f fix typo 2015-04-11 12:23:57 +01:00
David Wragg 7d51f8751b gofmt 2015-04-10 20:55:27 +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
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
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 d32f328c24 Simplify printing 2015-04-10 14:46:31 +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
Bryan Boreham 8a82f368d0 Update repository name from zettio to weaveworks 2015-04-08 16:35:52 +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
Matthias Radestock e97a3f88aa allow router to be started w/o capture/inject interface
useful for testing of the control plane
2015-04-02 09:46:29 +01:00
Matthias Radestock 33520ea230 include peer nickname in display output whenever possible 2015-03-27 05:25:28 +00:00
rade 245f747745 Merge pull request #488 from awh/486_administrative_peer_removal
Implement 'weave forget' command

Closes #486.
2015-03-27 01:53:16 +00:00
Matthias Radestock 308da993eb refactor: extract some funs for better readability 2015-03-27 01:51:04 +00:00
Matthias Radestock e3ef5433cf cosmetic: linting 2015-03-27 00:43:26 +00:00
Adam Harrison efb7c0f1bc gofmt 2015-03-26 10:54:46 +00:00
Adam Harrison dc8e82ea31 Implement weave forget command 2015-03-26 10:48:25 +00:00
Adam Harrison bd7b232663 Replace hand parsing and validation of URLs with Gorilla mux 2015-03-18 10:10:13 +00:00
David Wragg 2f7e0b5cad Simplify version printing 2015-03-06 11:15:24 +00:00
Matthias Radestock a00f67cf06 use correct API for figuring out whether crypto is enabled 2015-03-05 15:51:54 +00:00
David Wragg 619ebc20a8 Don't pass password around as a pointer to a slice
A slice can be nil, so there is no reason for extra indirection to
represent the lack of a password.
2015-03-05 14:19:54 +00:00
rade d1400bc233 Merge pull request #407 from awh/369_name_weave_peers
nicknames for weave peers

Closes #369.
2015-02-25 18:10:36 +00:00
Adam Harrison 4e9e183e0f Simplify argument parsing 2015-02-24 17:59:40 +00:00
Adam Harrison 3cf2179c67 Fix formatting 2015-02-24 16:52:44 +00:00
Adam Harrison 5e54637ffa Remove reference to containers from argument help 2015-02-24 16:52:22 +00:00
Adam Harrison 244af11701 Rename hostname to nickname
Accept -nickname parameter to weave script
2015-02-19 17:09:08 +00:00
Adam Harrison f517b947e6 Add hostname to peers 2015-02-19 12:29:37 +00:00
Bryan Boreham 410972906b Add version and encryption status into the JSON output 2015-02-06 17:35:39 +00:00
Bryan Boreham 42dfd5142e Remove Access-Control hack 2015-02-02 14:36:56 +00:00
Bryan Boreham c7af02776f Obtain status info in JSON format 2015-01-21 21:03:16 +00:00
Bryan Boreham 404c7a1ad4 When printing call-stacks from SIGQUIT, trim the buffer to remove garbage at the end 2015-01-19 16:54:40 +00:00
Matthias Radestock 48c8f9ea01 refactor: separate object creation from activation 2015-01-19 13:23:25 +00:00
Michael Bridgen 14f7d83e3e Merge branch '321_cope_with_weavetools_delays' of git://github.com/rade/weave into pr334 2015-01-09 17:40:42 +00:00
Matthias Radestock 11b87f879a make weave status show whether encryption is on/off
Closes #323.
2015-01-09 12:56:26 +00:00
Matthias Radestock f7ad2cd5af wait longer for ethwe interface to come up
in case we are running on a really, really slow machine/VM
2015-01-08 22:22:40 +00:00
Matthias Radestock 5da2219dc8 cosmetic: remove weaver/.gitignore
and handle that in the top-level .gitignore instead. Just as we do for weavedns.
2015-01-01 00:49:34 +00:00
Michael Bridgen 0a14eb58b2 Don't hardwire executable names; use logical names instead
We could use `os.Args[0]` instead of hardwired names, but that ends up
being e.g. `/home/weave/weaver`. So, use logical names instead.
2014-12-24 11:52:50 +00:00
Michael Bridgen ccf7e9993a Add version reporting to weaver 2014-12-24 11:04:51 +00:00