Commit Graph
4834 Commits
Author SHA1 Message Date
Bryan Boreham f57058f627 Use git commit hash instead of requiring user to enter a version tag on 'make publish' 2014-09-15 15:33:09 +01:00
Matthias Radestock bd45c7212f always notify ConnectionMaker of terminated connections
otherwise CM might have them stuck in the 'attempting' state
2014-09-15 15:28:11 +01:00
Matthias Radestock 8b37e07823 get rid of connection attempt count tracking 2014-09-15 15:05:40 +01:00
Bryan Boreham 7e8ac8c4d0 don't need ':latest' on the build line 2014-09-15 15:04:22 +01:00
Bryan Boreham 500bda596c Don't do the print args thing in this branch 2014-09-15 14:42:39 +01:00
Bryan Boreham 18f65dc344 Add 'publish' target to tag and push release 2014-09-15 14:40:57 +01:00
Bryan Boreham 244188776f Add tag to build command, so you can do "make tag=x.xx" to add a version number to the image 2014-09-15 14:26:13 +01:00
Bryan Boreham 39003233ea Remove version/build-date info from weaver binary 2014-09-15 14:05:15 +01:00
Matthias Radestock 5b18864aec refactoring
- rename addToTargets to addTarget
- immediately add to cm.targets; the phasing was unnecessary
- don't normalise addresses in addTarget - they are already normalised
2014-09-15 13:51:57 +01:00
Matthias Radestock d2bd78435e add 'weave reset'
Closes #20.
2014-09-15 12:43:58 +01:00
Matthias Radestock 8297fef53d remove WEAVE iptable chain on 'weave stop'
No point keeping it around.

Also, simplify idempotence of masquerading setup.

Follow-up to issue #48.
2014-09-15 12:03:29 +01:00
Matthias Radestock 2f1359ae9f remove masquerading rules on 'weave stop/launch'
Leaving iptable masquerading rules behind is a bad idea when weave is
re-launched with different ip subnet settings. So now we remove the
rules on 'weave stop' and also on 'weave launch' (in case weave had
been stopped in ways other than 'weave stop').

To make the rule removal easier, we create the rules in a user-defined
WEAVE chain.

Note that this will break old weave installations, since the rules
created by those are left behind. Easiest upgrade path is to restart
the machine. Or, for the brave, run `iptables -t nat -S POSTROUTING | grep weave | sed 's/^\-A/-D/g' | while read line; do iptables -t nat $line; done`.

Fixes #48
2014-09-15 11:34:57 +01:00
Matthias Radestock f10c460f48 leave networking alone on 'weave launch' unless we start container 2014-09-14 19:31:27 +01:00
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
Bryan Boreham 9be3a11e10 cosmetic 2014-09-12 18:04:18 +01:00
Bryan Boreham 21bec9fc78 Add a -version command to weave and weaver, implemented by embedding the build date by the makefile 2014-09-12 17:53:06 +01:00
Bryan Boreham 6483c89a2b Factor out commands implemented via the REST interface 2014-09-12 17:51:30 +01:00
Bryan Boreham ef35839d4b Merge remote-tracking branch 'upstream/master' into 23_retry_peers 2014-09-11 19:32:12 +01:00
adieu a91357978d Add attach command to weave. 2014-09-12 00:36:21 +08: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 34bec14e3e cosmetic 2014-09-10 17:48:53 +01:00
Matthias Radestock bf38e902f2 ensure validTarget only contains addresses we aren't connected to 2014-09-10 17:47:48 +01:00
Bryan Boreham 661b3f4da1 command-line addresses are already normalised so don't need to do it again 2014-09-10 17:40:39 +01:00
Matthias Radestock 1b3122b37b refactor: eliminate some helper functions 2014-09-10 17:02:16 +01:00
Matthias Radestock 20bfdc2e73 refactor 2014-09-10 16:54:22 +01:00
Matthias Radestock 9b1ec19432 refactor 2014-09-10 16:51:26 +01:00
Matthias Radestock 4a3fc47246 cosmetic 2014-09-10 16:47:41 +01:00
Matthias Radestock 145ebf3950 cosmetic: remove disabled log statements 2014-09-10 16:47:20 +01:00
Matthias Radestock 8488646e7b refactor: change method/signal name 2014-09-10 16:42:33 +01:00
Matthias Radestock 4e442393b2 refactor: 'enum' -> bool 2014-09-10 16:39:05 +01:00
Matthias Radestock ce2d3ff30a cosmetic 2014-09-10 16:35:31 +01:00
Matthias Radestock 8cb79145fa Merge branch '23_retry_peers' of https://github.com/bboreham/weave into bboreham-23_retry_peers 2014-09-10 16:34:10 +01:00
Bryan Boreham c6d8623b6f Only signal connection failures; remove successful connections when we see them 2014-09-10 16:17:56 +01:00
Bryan Boreham 0e23c29cae cosmetic 2014-09-10 16:02:50 +01:00
Bryan Boreham ba72999b04 cosmetic 2014-09-10 16:02:17 +01:00
Bryan Boreham 651c0a0c27 Remove tickNow() function 2014-09-10 16:00:31 +01:00
Bryan Boreham c28ff33c84 Avoid waiting 5 seconds before starting 2014-09-10 15:26:13 +01:00
Bryan Boreham 83175cdd0a Normalise IP addresses when adding to collections 2014-09-10 15:25:10 +01:00
Bryan Boreham e5bd3933d8 Normalise peer address before checking 2014-09-10 14:59:32 +01:00
Bryan Boreham 2050569fb6 Break checkStateAndAttemptConnections into phases, and track the end of all connection attempts 2014-09-10 14:50:43 +01:00