Ilya Dmitrichenko
9d48f942f8
Trim spaces in docker inspect format templates ( close #319 )
2015-01-06 15:46:22 +00:00
Matthias Radestock
cce5d2417a
make location of /proc overridable in script
...
useful for running weave inside a container
2015-01-04 13:07:52 +00:00
Matthias Radestock
ee7a3e48c9
weave setup to download all required docker images
...
Closes #308 .
2015-01-04 09:15:22 +00:00
Matthias Radestock
2d43b92572
display weavetools version
2015-01-02 18:29:52 +00:00
Matthias Radestock
eb628ec84a
invoke ethtool and conntrack from the weavetools image
2015-01-01 01:05:27 +00:00
Matthias Radestock
2481079957
don't include image version when checking for existing containers
...
So we complain with "already running" rather than "Found another
running container" when encountering a 'weave' container running a
different image version. Similarly, we remove stopped 'weave'
containers regardless of version.
Ditto for weavedns.
Which is all how it used to work.
2014-12-30 16:49:41 +00:00
Matthias Radestock
57856a5584
align script and image versions
...
- released weave scripts run their corresponding image versions
- unreleased weave scripts run the 'latest'-tagged image versions
The image version to run can also be specified explicitly by setting
VERSION. Useful for testing, mainly.
2014-12-30 16:20:00 +00:00
rade
c41c6fd8a7
Merge pull request #263 from zettio/versioned_releases
...
Machinery for versioned releases
2014-12-30 13:22:09 +00:00
Matthias Radestock
a0ec8c4daa
correctly check whether weavedns is running
...
and return an error status rather than exit when containers stop just
before an HTTP call, which in turn allows us to make tell_dns properly
ignore weavedns container absences.
Fixes #300
2014-12-29 17:27:39 +00:00
Liang-Chi Hsieh
961b1eb3de
Support detaching on containers created in container networking mode.
2014-12-29 23:14:59 +08:00
Matthias Radestock
70eea06de0
more precise detection of weave-attached-ness
...
Rather than looking for the host end of the veth pair, we look for the
expected interface inside the container. This has the advantage of
detecting weave-attached-ness even when the container is sharing a
network namespace with others.
Closes #303 , #302 .
2014-12-29 14:14:53 +00:00
Michael Bridgen
ec7dc556ed
Factor out ask_version and don't exit 1 if it fails
2014-12-29 12:05:38 +00:00
Matthias Radestock
4242a60768
use documented 'docker inspect --format=...' instead of '--format ...'
2014-12-28 00:11:03 +00:00
Matthias Radestock
f3faf83321
refuse to attach containers running in the host network namespace
...
Since bad things happen otherwise, i.e. we end up creating veth pairs
with an ethwe on the host
Closes #270 .
2014-12-27 15:14:29 +00:00
Michael Bridgen
b014d98c78
Put versions in the script and weavedns too, and report them
...
sudo weave version
2014-12-24 11:04:52 +00:00
Matthias Radestock
ad67dc5d07
don't swallow error
...
Since sometimes the error is different from what we expect.
2014-12-23 19:50:08 +00:00
Matthias Radestock
34db7044e4
cosmetic
2014-12-23 17:49:16 +00:00
Ilya Dmitrichenko
c61ed4010a
Simplify docker version sed expression ( close #282 )
2014-12-23 16:24:10 +00:00
Matthias Radestock
d0846961e3
cosmetic(ish): consistently use $(...) instead of ...
2014-12-23 14:52:15 +00:00
Bryan Boreham
5bb80c7126
Quote $@ everywhere, to guard against spaces, globbing, etc.
2014-12-23 14:42:48 +00:00
Matthias Radestock
af3d2c7e7f
cosmetic: break overlong lines
2014-12-23 12:27:13 +00:00
Liang-Chi Hsieh
f5afe3b203
Merge remote-tracking branch 'upstream/master' into if_param
...
Conflicts:
weave
weaver/Dockerfile
2014-12-22 20:58:20 +08:00
Bryan Boreham
887f2adbc1
Merge pull request #284 from rade/276_alternative_password_supply
...
LGTM. Closes #276
2014-12-22 11:03:28 +00:00
Liang-Chi Hsieh
1dc28e9025
Assign iface parameter from defined variable.
2014-12-22 15:59:29 +08:00
David Wragg
08a445cb6d
Merge PR #281 : gracefully deal with missing/old ip utility
...
Addresses #279
2014-12-21 15:36:59 +00:00
Matthias Radestock
41cb8a1215
ditch check_command_and_run wrapper
...
Since we end up swallowing the warning when wanting to redirect stderr
of the command execution.
Fixes #286 .
2014-12-21 15:07:21 +00:00
Matthias Radestock
66e55ee421
keep stdout and stderr separate in with_container_netns
...
so we don't end up swallowing warnings when redirecting stdout
Fixes #285 .
2014-12-21 14:29:54 +00:00
Matthias Radestock
7c513fc22b
don't duplicate output on error in with_container_netns
...
This does not cause any problems right now, since all the call sites
swallow stdout on error. But it is wrong nevertheless.
2014-12-21 13:51:59 +00:00
Matthias Radestock
e2ec460752
feed password to weave via env var, possibly via a file
...
The latter is the most secure route since it keeps the password
completely out of any command lines, and the permissions on the file
can be very restrictive, e.g. 0400.
It would be somewhat nicer if the password file contained just
<password>
rather than
WEAVE_PASSWORD=<password>
but then we'd have to transit the password via a temporary file with
0600 permissions.
2014-12-20 01:22:59 +00:00
Matthias Radestock
f381d0af98
gracefully deal with missing/old ip utility
2014-12-19 12:18:01 +00:00
Michael Bridgen
7187d38047
Merge remote-tracking branch 'rade/189_assert_docker_networking'
2014-11-28 14:06:16 +00:00
Michael Bridgen
56056c06b1
Merge remote-tracking branch 'rade/186_stop_dns'
2014-11-28 12:55:43 +00:00
Bryan Boreham
ccd6cb0440
Use full container names when populating weavedns. Fixes #250
2014-11-28 12:49:05 +00:00
Bryan Boreham
f2ef3dcfe7
Merge pull request #243 from rade/240_dns_without_docker_net
...
LGTM. Fixes #240
2014-11-28 12:16:40 +00:00
Bryan Boreham
33fb296769
Merge pull request #245 from rade/238_check_docker_version_when_using_dns
...
Looks good to me. Fixes #238
2014-11-28 11:17:13 +00:00
Matthias Radestock
57242f790e
check that weave container has an eth0
...
since w/o that we get an obscure error.
The most likely cause for not having an eth0 is that the docker daemon
has been configured to disable container networking.
2014-11-28 11:06:36 +00:00
Bryan Boreham
a3482c9f2d
Merge pull request #244 from rade/233_stop_on_docker_run_errors
...
LGTM. Fixes #233
2014-11-28 11:01:51 +00:00
Matthias Radestock
8a6c7f7d22
Merge branch '233_stop_on_docker_run_errors' into 238_check_docker_version_when_using_dns
2014-11-28 10:42:33 +00:00
Matthias Radestock
b18b24b3f3
--version -> -v
2014-11-28 10:40:59 +00:00
Matthias Radestock
c070f0b08c
add weave stop-dns
...
and in the process disentangle stopping dns from `weave stop`
2014-11-28 10:13:48 +00:00
Matthias Radestock
d707ed5df0
we should never write messages to stdout
2014-11-28 10:00:46 +00:00
Matthias Radestock
fd6f19cc44
check for Docker version >= 1.2.0 when using "--with-dns"
...
since --dns-search=. is is new in that version
2014-11-28 09:10:14 +00:00
Matthias Radestock
2da534445a
stop on 'docker run' errors
...
This broke due to our workaround for
https://github.com/docker/docker/issues/8632 , which affects Docker
version 1.3.0 only, so now we refuse to run with that.
2014-11-28 00:57:49 +00:00
Matthias Radestock
010d488ad7
refactor: simplify regexp
2014-11-27 17:32:44 +00:00
Matthias Radestock
24702e3a7a
stop weavedns from complaining when a container has no docker ip
...
e.g. when it was started with --net=none
weavedns wasn't actually using the docker-assigned ip for anything, so
this change is a simple matter of eradicating it from the code.
2014-11-27 16:13:06 +00:00
Matthias Radestock
65c77df279
less noise
2014-11-27 15:27:59 +00:00
Matthias Radestock
625df2e7d5
refactor(ish): move veth creation into one place
...
This simplifies the code, but means we do end up invoking ethtool on
the weave container's ethwe, which isn't necessary but harmless.
2014-11-27 11:11:29 +00:00
Matthias Radestock
29b3db6c05
run ethtool outside container netns
...
We want to run as little as possible inside the container netns.
Unfortunately we cannot make that change for the weave container,
since the interface on which we need to invoke ethtool is created by
docker and already inside the container netns by the time we get
control.
2014-11-27 10:20:25 +00:00
Matthias Radestock
1ba1f63776
refactor
2014-11-27 10:07:30 +00:00
Matthias Radestock
d9ea3b44a1
always mark the interface as 'up' last
...
since that kinda acts as a marker that everything is ready
2014-11-27 09:56:12 +00:00