Michael Bridgen
a61080e025
Supply a --dns-search to blank the inherited resolv.conf search
...
In the absence of *either* a `--dns` or `--dns-search` argument,
Docker will write a `/etc/resolv.conf` based on the host's. Since, in
general, we rely on the DNS search path being empty (so that the
resolver uses the local domain), we want to blank the
`/etc/resolv.conf` by providing `--dns-search=.` when running a
container.
However, if there's a `--dns-search=` in the remainder of the args,
Docker will append them to the dot, which breaks resolution. Not good.
So, we only "blank" the search path if there's no `--dns-search`
argument present already.
2014-11-11 15:23:06 +00:00
Matthias Radestock
a34e214201
expose DNS port via Dockerfile rather than 'docker run' argument
...
That is "the Docker way".
Related to #141 .
2014-11-11 12:52:17 +00:00
Matthias Radestock
2fb79da625
make DNS work when docker is running with --icc=false
...
1) expose the DNS port from the weavedns container
2) link all application containers to the weavedns container
2014-11-08 15:34:23 +00:00
Matthias Radestock
9c620e81d6
kill dns container on weave stop
...
since just running `docker rm -f` has a nasty habit of getting stuck
sometimes.
2014-11-07 12:27:34 +00:00
Matthias Radestock
2fd9b91fc1
remove weavedns container on weave reset
...
(and some cosmetics)
Fixes #171
2014-11-06 22:38:07 +00:00
Matthias Radestock
eacc14dfe2
tidying: remove superfluous var
2014-11-06 22:05:14 +00:00
Matthias Radestock
a16c6acc32
properly detach containers from network on 'weave reset'
...
since otherwise we are leaving veth pairs behind which a) breaks a
subsequent 'weave attach', and b) runs contrary to 'weave reset's
stated purpose of removing all traces of weave.
NB: This does yank the ethwe interface from the containers.
Fixes #164
2014-11-06 22:02:24 +00:00
Matthias Radestock
57c17b6cef
use /dev/urandom instead of /dev/random to avoid blocking
...
...since in some typical deployment scenarios, e.g. small, minimal
VMs, not enough entropy may be available.
Fixes #170 .
2014-11-06 21:46:12 +00:00
Bryan Boreham
d85071ce4f
Run weavedns with --privilege to work on more locked-down platforms
2014-11-05 12:43:54 +00:00
Bryan Boreham
7b302f5ef0
Add tail -1 to work round Docker logging to wrong place
2014-11-05 12:33:17 +00:00
Bryan Boreham
8229c0617c
Fix small error in curl arguments
2014-11-05 12:33:05 +00:00
Michael Bridgen
55c8b80075
Reform rest_call
...
First, it's not ReST, so rename to http_call; second, separate the
port into its own argument and put the values in variables; third,
replace the container names with the appropriate variables.
2014-10-31 13:29:32 +00:00
Michael Bridgen
08a0cf3442
Merge branch 'master' into integrate_weavedns
...
Conflicts:
weave
2014-10-29 16:28:54 +00:00
Michael Bridgen
7729f6d742
Realign usage message
2014-10-29 15:19:48 +00:00
Michael Bridgen
b47e819485
Don't include routing_prefix in calls from script
...
I took subnets out of the DNS code.
2014-10-29 14:52:03 +00:00
Bryan Boreham
05921833a3
Launch weavedns and update it on run, start, attach and detach
...
Conflicts:
weave
2014-10-29 14:20:24 +00:00
Bryan Boreham
f56700a032
Factor out routine to check if a container is already running
...
Conflicts:
weave
2014-10-29 14:20:24 +00:00
Bryan Boreham
75deacaed0
Factor out REST call
...
Conflicts:
weave
2014-10-29 14:20:24 +00:00
Bryan Boreham
8ab9bad31d
cosmetic
2014-10-29 12:34:28 +00:00
Bryan Boreham
72b62b4ffc
Add weave ps to usage
2014-10-29 12:34:09 +00:00
Bryan Boreham
c749427de5
cosmetic
2014-10-29 11:48:23 +00:00
Bryan Boreham
d56ac73732
Inline weave ps function
2014-10-29 11:47:23 +00:00
Bryan Boreham
fe2d1a3699
CONTAINER_IFNAME rather than ethwe
2014-10-29 11:44:20 +00:00
Bryan Boreham
52a4fe545e
Add mac address to weave ps output
2014-10-29 11:39:12 +00:00
Bryan Boreham
aed3fec3e4
Merge branch 'master' into 138_weave_ps
...
Conflicts:
weave
2014-10-29 11:19:03 +00:00
Matthias Radestock
1b9dbad15f
cosmetic
2014-10-27 14:34:59 +00:00
Matthias Radestock
741f4616a4
Merge branch 'master' into 140_weave_connect
...
Conflicts:
weave
2014-10-27 14:33:26 +00:00
Matthias Radestock
4b8988346f
cosmetic
2014-10-27 14:08:54 +00:00
Matthias Radestock
6393e545ae
introduce 'weave connect' to connect a running router to other peers
...
Getting this to work with 'wget' is just too cumbersome especially
when it comes to getting the error message out. So 'curl' only.
2014-10-27 09:15:14 +00:00
Matthias Radestock
fad5846946
refactor: extract basic container/bridge connection establishment
...
Note that we do not mark the interface in the container as 'up' here
since some callers, in particular 'attach', add CIDRs to the
interface, and some programs rely on 'up' implying 'has IP address'.
2014-10-26 12:13:28 +00:00
Matthias Radestock
de82adce46
Merge branch 'master' into 130_launch_without_ip
...
Plus a bit of a refactoring, to avoid duplicating the CIDR
regexp. Plus some minor cosmetic tweaks.
Conflicts:
README.md
weave
2014-10-25 22:26:31 +01:00
Matthias Radestock
d8bea832d3
validate CIDR
...
This isn't meant to be precise but supposed to guard against silly
mistakes.
Closes #116 .
2014-10-25 22:04:36 +01:00
Matthias Radestock
007b68c206
explain that peer can be specified as fqdn and contain optional port
...
Closes #137 .
2014-10-25 19:51:06 +01:00
Matthias Radestock
e9c5b2c3ea
refactor: extract weave ports and container name into constants
2014-10-25 19:42:52 +01:00
Matthias Radestock
ce631e7f28
stricter param count checking
2014-10-24 16:56:58 +01:00
Matthias Radestock
76a974f88b
refactor: maintain abstraction
2014-10-24 16:07:06 +01:00
Matthias Radestock
d3ba6746a5
backward compatibility
2014-10-24 15:36:54 +01:00
Matthias Radestock
00a4a5e056
refactor: simplify multicast route addition in 'attach'
2014-10-24 13:15:15 +01:00
Matthias Radestock
560cbabb54
refactor: simplify 'attach'
...
Move the interface into the container network NS asap, which
simplifies error handling.
2014-10-24 13:13:34 +01:00
Matthias Radestock
de96742935
refactor: remove add_nat_rule
...
it did too little to be worthwhile
2014-10-24 13:03:28 +01:00
Matthias Radestock
093b23fa83
refactor: it's not an IPADDR but a CIDR
2014-10-24 12:59:47 +01:00
Matthias Radestock
5b6a892c38
refactor: don't extract param to var and shift unless we have to
2014-10-24 12:57:35 +01:00
Matthias Radestock
6501934a15
make with_container_netns take the container as the first arg
...
and invoke the subsequent command.
This is closer to typical 'with' semantics.
2014-10-24 12:50:29 +01:00
Matthias Radestock
34e240c4a5
remove misleading comment...
...
attach() and detach() are never invoked directly,
plus it's really not that hard to figure out what they do.
2014-10-24 12:49:04 +01:00
Matthias Radestock
579f3469c8
simplify code for attach
2014-10-24 12:30:42 +01:00
Matthias Radestock
7a53efe66c
get error handling right
2014-10-24 11:27:32 +01:00
Matthias Radestock
85787f2d4e
fix 'weave start' post rebase
2014-10-24 10:21:02 +01:00
Matthias Radestock
0adda9eae9
drop IP/network from 'weave launch'
...
plus a whole bunch of other small changes to weave script which I'll
eventually extract into separate commits.
2014-10-24 10:19:22 +01:00
Bryan Boreham
ced7299140
Removed weave ps -v option
2014-10-24 10:14:32 +01:00
Bryan Boreham
e4fe57a02c
Make extra container information optional
2014-10-24 10:14:32 +01:00