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.
- 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.
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
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.
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.
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.
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.
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.
`populate_dns` previously used http_call, which looks up the IP for a
container each time. I've factored the HTTP bit after the IP look-up
in http_call out, so it can be used directly. This involved switching
arguments around to make the tail call easier.