Commit Graph
106 Commits
Author SHA1 Message Date
Matthias Radestock 8fa24fd6d4 Merge branch '67_attach' of https://github.com/bboreham/weave into bboreham-67_attach 2014-09-23 14:51:11 +01:00
Matthias Radestock f59b9577c8 Merge branch '67_attach' of https://github.com/bboreham/weave into bboreham-67_attach 2014-09-23 14:49:02 +01:00
Bryan Boreham 8e50e0759d Make attach and detach idempotent 2014-09-23 14:49:00 +01:00
Bryan Boreham 2d8318b158 Improved test for blank string 2014-09-23 13:53:20 +01:00
Bryan Boreham a6b83a1234 Updated instructions for attach and detach 2014-09-23 13:52:41 +01:00
Bryan Boreham d1896e86d0 Redesigned attach/detach 2014-09-23 13:01:21 +01:00
Bryan Boreham 6ed2ab10a1 Only push two tags - latest and git-commit - to DockerHub 2014-09-22 17:44:13 +01:00
Bryan Boreham 0947fc204f Untabify 2014-09-18 17:20:08 +01:00
Bryan Boreham 4868585d6e Add detach command 2014-09-18 17:18:54 +01:00
Bryan Boreham bb629bac84 Merge remote-tracking branch 'upstream/master' into 67_attach 2014-09-18 12:45:51 +01:00
Bryan Boreham 3c871e69d2 Merge branch 'master' of https://github.com/binocarlos/weave into 67_attach
Conflicts:
	weaver/weave
2014-09-18 12:42:46 +01:00
Bryan Boreham a671ca1a89 Merge branch 'add-attach' of https://github.com/adieu/weave into 67_attach 2014-09-18 12:31:53 +01:00
Matthias Radestock 331c8553db cosmetic 2014-09-18 12:30:43 +01:00
Bryan Boreham 0ed57bad67 rm tempfile before we use it, to avoid attack via symlink 2014-09-18 11:56:15 +01:00
Bryan Boreham 86644f7615 cosmetic 2014-09-18 11:55:47 +01:00
Bryan Boreham c48ae19c55 Tidy up messages; ensure errors to to stderr 2014-09-18 11:47:47 +01:00
Bryan Boreham a75a0d8709 If and only if network setup because the container died, say so.
This involves capturing stderr output from all the 'ip' commands so we
can hide that output if we see the process died, or show it to the user
if the process didn't die, in which case we don't know why we failed.
2014-09-18 11:24:08 +01:00
Bryan Boreham bfd5007339 Don't test if symlink exists before 'rm -f'
When the symlink's target doesn't exist, '[ -f' is false, so the symlink doesn't get removed.
Since we do always want it to be removed, just call 'rm -f' anyway, which won't complain
if the file doesn't exist.
2014-09-18 11:03:06 +01:00
Bryan Boreham 2f5a9733b8 Take out debugging -x mode 2014-09-17 16:32:21 +01:00
Bryan Boreham 0a403dd081 untabify 2014-09-17 16:31:52 +01:00
Bryan Boreham 09aed84638 return not exit from function 2014-09-17 16:30:50 +01:00
Bryan Boreham eabcc55f73 fix subshell syntax and make del/delete consistent 2014-09-17 16:25:46 +01:00
Bryan Boreham fd7b034713 untabify 2014-09-17 16:11:30 +01:00
Bryan Boreham 7c979d6725 Remove veth and/or netns symlink if interface configuration fails part-way through 2014-09-17 15:44:34 +01:00
Matthias Radestock e287110099 improve error messages and make sure they all go to stderr
...since otherwise they get hidden when the output is redirected,
e.g. in the typical

    # C=$(weave run ...)

invocation.
2014-09-17 06:46:02 +01:00
Kai Davenport 5490826666 attach command that accepts and existing container id and runs configure_container_networking using it 2014-09-15 10:25:59 -07:00
rade af94153d96 Merge pull request #44 from bboreham/23_retry_peers
Rewrite of ConnectionMaker

Fixes #23. Fixes #26.
2014-09-15 17:42:32 +01:00
Bryan Boreham 81ad24b10f Don't need 'exit 0' any more 2014-09-15 16:50:50 +01:00
Bryan Boreham 58c59caf1c Merge branch 'master' into 56_display_version 2014-09-15 16:49:27 +01:00
Bryan Boreham 66b28593b2 Fix indenting 2014-09-15 16:48:12 +01:00
Bryan Boreham 87a4dee7ea Added 'weave version' command per Issue #56 2014-09-15 16:32:19 +01:00
rade 5cc0eb4554 Merge pull request #49 from bboreham/10_display_version
tag published image with git revision

fixes #10
2014-09-15 16:01:10 +01:00
Bryan Boreham 25c4adf68e Don't need :latest on tag command 2014-09-15 16:00:08 +01:00
Bryan Boreham 1748b6e790 Merge remote-tracking branch 'upstream/master' 2014-09-15 15:42:44 +01:00
Bryan Boreham 976d36571a Add MAINTAINER line 2014-09-15 15:42:05 +01:00
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
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 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