Bryan Boreham
8de22f4bf1
reformat
2014-10-10 12:28:52 +01:00
Bryan Boreham
be39cb01bd
Resolve peer names to IP address at startup
2014-10-10 12:22:01 +01:00
Matthias Radestock
cf9c479727
check that the go stdlib was built with the required options
...
AFAICT, go build tags are a compile-time only construct, so there is
no way to query whether a certain package was built with a specific
tag. However, the 'netgo' tag triggers conditional compilation of the
cgo_stubs.go file, and that file name ends up in the executable. (we
could have looked for specific symbols in the 'net.a' library instead,
but that requires locating it first, which is more hassle than it is
worth)
issue #93
2014-10-09 20:57:56 +01:00
Matthias Radestock
7b02365de8
make dns resolution work in weave container
...
by using go's internal DNS resolver.
NB: this relies on go's std library having been compiled with the
netgo build tag, e.g.
sudo go install -tags netgo -a std
issue #93
2014-10-09 19:33:58 +01:00
Matthias Radestock
d4a2bc8024
document WEAVE_DOCKER_ARGS
2014-10-07 22:22:21 +01:00
Matthias Radestock
6d0df649fc
refactor: extract weave docker image name
...
Thanks to @hesco for the suggestion.
2014-10-07 19:32:39 +01:00
Matthias Radestock
764ced41b8
more portable bridge creation
...
using the documented 'ip link add' syntax
Thanks to @hesco for the suggestion.
2014-10-07 19:27:14 +01:00
David Wragg
399af7b0cb
Comment typo fix
2014-10-07 14:43:07 +01:00
David Wragg
c4c06a2dc0
Don't use /tmp for big files
...
/tmp is on tmpfs on some systems, so it's better to use /var/tmp
for large files.
2014-10-06 19:35:24 +01:00
David Wragg
89fa310c00
Provide a way to bypass the use of sudo
...
It's not necessary to be root to run "docker" commands, if your
user is in the "docker" group.
2014-10-06 19:34:12 +01:00
Matthias Radestock
e7e7de2173
check whether a container has died with docker rather than ps
...
since that means one less dependency on running 'weave' in the same
namespace as docker
2014-09-30 17:31:47 +01:00
Matthias Radestock
f4a5012dc7
refactor: keep bridge name abstract
2014-09-30 16:11:29 +01:00
Matthias Radestock
4d5faafd0c
refactor: order functions by dependency
2014-09-30 16:09:56 +01:00
Bryan Boreham
a09a229b44
Improve robustness
2014-09-30 16:02:06 +01:00
Bryan Boreham
c3fdee766f
Add iptables rule to forward traffic across the bridge, to avoid ufw blocking it
2014-09-30 15:24:30 +01:00
Bryan Boreham
a31d8c4d80
Refactor add_nat_rule into add_iptables_rule that is more general
2014-09-30 15:23:23 +01:00
Matthias Radestock
393b5cd459
automatically fetch dependencies
2014-09-30 13:13:41 +01:00
David Wragg
1366c01f6a
Restore comment that got lost when rearranging code
2014-09-29 09:59:26 +01:00
David Wragg
cb0541078a
Route multicast packets across the weave network
...
Add a route to send multicast packets to ethwe and so across the weave
network.
Without that, multicast packets get sent to the default route, i.e.
to docker's eth0 interface, rather than across the weave network.
So IP multicast doesn't work between containers on different hosts,
even though weaver supports it.
2014-09-26 09:30:46 +01:00
David Wragg
28e74c166a
Restructure attach and detach
...
To make the control flow more obvious.
2014-09-26 09:30:46 +01:00
Kai Davenport
f6b8e9a675
change -passwd to -password in usage function
2014-09-24 14:19:40 -07:00
Matthias Radestock
ada941cfcb
Merge branch 'bboreham-54_reboot'
...
Closes #54
2014-09-24 12:24:31 +01:00
Bryan Boreham
704c3dad67
Improved comment
2014-09-24 10:17:45 +01:00
Bryan Boreham
ad3a36686f
Cosmetic
2014-09-24 10:11:36 +01:00
Bryan Boreham
d5acb312b4
Rename 'configure_container_networking' to 'attach'
2014-09-24 10:01:52 +01:00
Bryan Boreham
dc611fa0af
Refactor common code in attach/detach
2014-09-24 09:39:44 +01:00
Matthias Radestock
02efccc36a
cosmetic
2014-09-23 16:18:00 +01:00
Matthias Radestock
5477f671db
Merge branch '54_reboot' of https://github.com/bboreham/weave into bboreham-54_reboot
2014-09-23 16:13:45 +01:00
Bryan Boreham
a21860689a
Merge remote-tracking branch 'upstream/bboreham-67_attach' into 67_attach
2014-09-23 16:05:45 +01:00
Bryan Boreham
9e3cbba275
Capture error output from ip command and check if error was caused by container dying
2014-09-23 16:00:03 +01:00
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
0d3eebb208
Change -wait from bool to int number of seconds to wait
2014-09-22 16:48:55 +01:00
Bryan Boreham
5b93577054
log.Fatal() does os.Exit(1) so we don't need to do it again
2014-09-22 16:42:18 +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