Commit Graph
51 Commits
Author SHA1 Message Date
Matthias Radestock 4c93991651 ignore conntrack result in 'weave stop'
so we exit with status 0, since not having any existing flows is
perfectly normal
2014-09-14 19:08:00 +01:00
Matthias Radestock 948312f03d refactor: extract container network configuration
and use more function parameters in preference to global vars
2014-09-13 21:45:42 +01:00
Matthias Radestock c845ba7872 remove detritus
we haven't depended on pipework for a while
2014-09-13 20:48:49 +01:00
Matthias Radestock 6eb7e1aa43 disable offloading on weave bridge
since w/o it the kernel just ignores the PMTU when the host talks to
weave via 'weave expose'

Fixes #52
2014-09-13 19:58:54 +01:00
Matthias Radestock b4791be4f4 refactor: extract command checking helper 2014-09-13 19:47:38 +01:00
Matthias Radestock a53c817b8d create bridge in 'weave expose/hide'
since they really need the bridge
2014-09-13 17:44:29 +01:00
Matthias Radestock 1fac995248 work around 'docker rm -f' weirdness
I've been seeing

~# docker rm -f weave
Error response from daemon: Cannot destroy container weave: Driver devicemapper failed to remove root filesystem 29e46c3e400ee3c8654f2b06a0f6d97bde98dfeb9bb61d25195dba38c04324fc: Device is Busy

whereas the corresponding two-step 'docker kill' + 'docker rm' works
fine.
2014-09-13 07:51:06 +01:00
Matthias Radestock 51afd5e9c6 make 'weave launch' cope gracefully with existing 'weave' containers
Fixed #31
2014-09-11 07:56:26 +01:00
Matthias Radestock 710cf7ea8a nicer error on 'weave stop' and make it idempotent 2014-09-11 07:33:02 +01:00
Matthias Radestock b6351acb66 simplify error message 2014-09-11 07:19:14 +01:00
Matthias Radestock dbbb8c690a nicer error message on 'weave status' when there is no weave container. 2014-09-11 07:15:15 +01:00
Matthias Radestock 96766db5f0 consistency 2014-09-11 07:12:49 +01:00
Matthias Radestock 42b7abba10 no need to expose ports
since 'weave launch' publishes them anyway
2014-09-10 12:13:15 +01:00
Matthias Radestock 6f3de33318 gm fmt 2014-09-08 17:37:34 +01:00
Matthias Radestock 8e6a9fb9b8 explain the 'iptables -w' check 2014-09-05 14:35:43 +01:00
David Wragg 91268fa0ba Check that 'iptables -w' is supported before using it
'-w' was only introduced in a recent version of iptables.  It means
"Wait for the xtables lock", so it seems reasonable to proceed without
it for older versions.
2014-09-05 12:51:41 +01:00
Bryan Boreham 733af3f108 Swap round 'status' and 'stop' in usage 2014-09-04 15:24:18 +01:00
Bryan Boreham c930ef38dc Improved error message on http ListenAndServe 2014-09-04 14:59:48 +01:00
Bryan Boreham 04ca3d2469 Addressed various points raised in review: error-handling, simplified Fprint call 2014-09-04 14:44:42 +01:00
Bryan Boreham 67d8220bdf Convert one further use of 'command -v' into the function command_exists 2014-09-04 13:04:19 +01:00
Bryan Boreham 43d8781fdd Merge remote-tracking branch 'upstream/master' into 11_http_interface
Conflicts:
	consts.go
	weaver/weave
2014-09-04 13:02:14 +01:00
Matthias Radestock a7e44b44dc match on bridge name in iptable masquerade rules
Instead of ip/netmask. This should be functionally equivalent (for
now), and makes it easier to identify the rule as belonging to
weave. Unfortunatley we must still match the source with ip/netmask,
since we are in the POSTROUTING chain and source interface matches
aren't valid there.

See also issue #20.
2014-09-03 19:09:52 +01:00
Matthias Radestock 0767964934 introduce 'weave hide' 2014-09-03 11:17:24 +01:00
Matthias Radestock d0dc7b7556 'service import' feature 2014-09-03 09:05:59 +01:00
Matthias Radestock 0a7df2220c introduce 'weave stop'
which, as well as stopping&removing the weave container also clears
the UDP connection tracking for the weave port, without which UDP
connections to a quickly (<3min) re-started weave would fail.

Fixes #18
2014-09-01 16:08:47 +01:00
Matthias Radestock 971f6a63fd Turns out one OS thread isn't enough 2014-08-31 14:43:06 +01:00
Matthias Radestock 731454a406 introduce 'weave expose'
which simplifies access to containers from the host, as well as
external access.
2014-08-30 15:40:50 +01:00
Matthias Radestock b9be18c386 set up masquerading as part of 'weave launch'
thus simplifying external access
2014-08-30 14:25:00 +01:00
Matthias Radestock 3107aba53f unbreak script
I have no idea why this matters
2014-08-29 17:40:38 +01:00
Matthias Radestock d0d8949f72 make 'weave <unknown_command>' a no-op 2014-08-29 16:20:41 +01:00
Matthias Radestock 51a33929ea remove unused var 2014-08-29 16:17:10 +01:00
Matthias Radestock 2c88710d62 we only need the bridge address when launching weave 2014-08-29 16:16:16 +01:00
Matthias Radestock 180c142964 move the most important check first 2014-08-29 16:12:44 +01:00
Matthias Radestock d8cc45c650 fix weave arg count check 2014-08-29 16:10:29 +01:00
Bryan Boreham 48bcaa7851 Pull out ugly 'command -v' code to a utility function 2014-08-29 15:49:25 +01:00
Bryan Boreham c8da7131a5 Add back the usage test for two arguments, except when the command is 'status' 2014-08-29 15:35:27 +01:00
Bryan Boreham cff8e93de1 Merge remote-tracking branch 'upstream/master' into 11_http_interface
Conflicts:
	weaver/weave
2014-08-29 15:29:56 +01:00
Bryan Boreham 3942f19897 Remove boilerplate and condense the http handler down to one function.
Also fixed indenting on one line in shell script.
2014-08-29 15:26:04 +01:00
Matthias Radestock ef9dbcb854 oops, make weave usage output match the command 2014-08-29 15:22:19 +01:00
Bryan Boreham 3f9eadda70 Merge remote-tracking branch 'upstream/master' into 11_http_interface 2014-08-29 14:54:44 +01:00
Bryan Boreham 94e00e2c8e ran 'go fmt'; cosmetic changes 2014-08-29 14:51:31 +01:00
Bryan Boreham a113da0e34 Added a new command 'weave status', implemented via an http listener #11 2014-08-29 14:44:50 +01:00
Matthias Radestock 02f39f17f9 grrr 2014-08-29 14:27:19 +01:00
Bryan Boreham 5908df4f17 added Boot2Docker instructions, and simplified the message when ethtool is missing 2014-08-28 17:41:22 +01:00
Bryan Boreham dced4e3d6f add a test to see whether ethtool is available before trying to run it 2014-08-28 17:20:17 +01:00
Matthias Radestock 9924f420e5 banish bashism 2014-08-28 16:18:30 +01:00
Matthias Radestock fa5a5f46b4 usability: check that script is being run as root
so we can display a nicer error if not
2014-08-26 13:40:09 +01:00
Matthias Radestock e057799e0c add some basic error handling to 'weave' script 2014-08-26 11:54:01 +01:00
Matthias Radestock 565856eaba run weave in privileged container
...since on selinux (and possibly others) we encounter a "bind:
permission denied" error instead, most likely because weave is
attempting to bind a raw ip socket, which is a restricted operation on
those systems.

Fixes #7
2014-08-26 10:27:47 +01:00
Matthias Radestock 516c1363e3 eliminate dependency on pipework
...and docker-ns (though we still leave the script around since it's
handy for debugging), and arping (as I have yet to encounter a
situation where it was required)
2014-08-22 18:14:17 +01:00