Commit Graph
166 Commits
Author SHA1 Message Date
Adam Harrison 0aa36cf8d0 Try to get weaveDNS status even if router container is missing 2015-03-18 13:39:08 +00:00
Adam Harrison 6f57774d15 Include zone records in status 2015-03-17 15:02:09 +00:00
Adam Harrison 9cf7da7277 Modify weave status to include DNS information 2015-03-17 14:03:18 +00:00
Matthias Radestock 2369b43c8d cosmetic: move new funs to 'right' place 2015-03-16 15:33:05 +00:00
David Wragg 4dcf77c210 Commentary 2015-03-16 15:12:44 +00:00
David Wragg 39011a5218 Don't clean up the container interface after moving it into the netns
The most likely cause of failure is the container going away, in which.
case we don't need to clean up.  And there are other points of possible
failure in the same category in attach(), so making sure we clean up the
container interface under all conditions is a  broader issue.
2015-03-16 15:12:44 +00:00
David Wragg e844753a21 Don't duplicate ARP cache configuration 2015-03-16 15:12:44 +00:00
David Wragg 78b0a57007 Send an unsolicited ARP response when a container attaches
Using arping, which is part of the iputils package and so seems to
be ubiquitous.
2015-03-16 15:12:44 +00:00
David Wragg 9b62bcb75d Don't need to use sed to get the IP address part of a CIDR 2015-03-16 15:12:44 +00:00
David Wragg 7a8a7010e2 Refactor for uniform handling of CIDRs
Not quite a pure refactoring because it adds a missing
'validate_cidr'.
2015-03-16 15:12:44 +00:00
David Wragg 11af544071 Configure ARP cache to react more quickly to MAC address changes
When an IP address was reused by a new container, other containers
could experience delays of many seconds the first time they tried to
talk to that new container before successful communication would
occur.  This delay came from three sources related to ARP cache
behaviour:

- The kernel would take a while to decide that an ARP mapping was
  stale due to lack of positive evidence (due to the
  base_reachable_time default of 30s)

- Even once an ARP mapping was considered stale, the kernel would wait
  a few seconds before sending an ARP request, in the hope that a
  higher layer (e.g. TCP) would confirm the ARP entry (due to the
  delay_first_probe default of 5s)

- When the kernel sent out an ARP request to update a stale entry,
  initial attempts would unicast the request to the old MAC address
  before resorting to broadcast (due to the ucast_solicit default of
  3)

This change reduces all these values, so that any delays
are a few seconds.

For most workloads, this should not greatly increase the amount
of ARP traffic, because communication via TCP is often sufficient
to confirm ARP entries.  And one unicast ARP request is still sent
just in case.

Unfortunately, there's a fixed-but-only-recently bug in the kernel
that means that changing base_reachable_time can take a while to take
effect:
<https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4bf6980dd0328530783fd657c776e3719b421d30>.
This means that a container will continue to use a long reachable_time
delay for the first few minutes of its life.
2015-03-16 15:12:27 +00:00
David Wragg e8ed9c707d Refactor 2015-03-16 10:46:24 +00:00
Matthias Radestock 123e8bbb28 reduce likelihood of IP clashes in tests & examples
by using the 10.2 range, which is not one used by docker and also is
less likely than 10.0 to be used by something else.

Fixes #402.
2015-03-09 20:51:26 +00:00
Bryan Boreham e22b470c3e Add the change from #395, which got lost
`-t` flag creates a tty for the command, so we can interrupt it with Control-C
2015-02-27 16:39:53 +00:00
Adam Harrison 326a5d19b3 Transpose script arguments to match declaration order 2015-02-24 22:23:51 +00:00
Adam Harrison 244af11701 Rename hostname to nickname
Accept -nickname parameter to weave script
2015-02-19 17:09:08 +00:00
Adam Harrison f517b947e6 Add hostname to peers 2015-02-19 12:29:37 +00:00
Matthias Radestock f01d9ce092 explain why create-bridge is undocumented 2015-02-04 16:00:35 +00:00
rade 99770c564b Merge pull request #377 from sttts/expose-hide-without-ethtool
Also avoid calling ethtool in expose and hide
2015-01-29 23:26:30 +00:00
Matthias Radestock bb134154a8 banish non-posix sed regexps
Fixes #371.
2015-01-29 21:39:11 +00:00
Dr. Stefan Schimanski d77e3a4c22 Also avoid calling ethtool in expose and hide
Those two commands are used in the pre-docker phase when you setup your
weave bridge using create-bridge, e.g. inside /etc/network/interfaces.
2015-01-29 13:21:49 +01:00
Ilya Dmitrichenko dfd7d0fe54 Add create-bridge command 2015-01-22 18:04:22 +00:00
Matthias Radestock 719efd0ac4 eliminate dependency on 'curl' on host
...by bundling it in the weavetools image

Closes #351.
2015-01-18 17:57:21 +00:00
Michael Bridgen 14f7d83e3e Merge branch '321_cope_with_weavetools_delays' of git://github.com/rade/weave into pr334 2015-01-09 17:40:42 +00:00
Ilya Dmitrichenko 5e08ba677e Remove -passwordfile option
The only two options should be `-password` and `WEAVE_PASSWORD`.
2015-01-09 09:59:28 +00:00
Matthias Radestock 52506cb39a ensure we have the weavetools image
prior to entering any time-sensitive code, in particular
post-container-startup network configuration.
2015-01-08 22:14:52 +00:00
Ilya Dmitrichenko 833fcce792 Use WEAVE_PASSWORD environment variable, if no args supplied 2015-01-08 17:08:35 +00:00
Ilya Dmitrichenko 5cbc4fa33d Make passing of password more readable 2015-01-08 17:08:35 +00:00
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