Bryan Boreham
4a2affabb5
Clean up so test will run again on same host
2016-03-19 16:35:45 +00:00
Bryan Boreham
09a6c2eda0
Get the owned ranges for test purposes via the actor loop, so we don't set off the race detector
2016-03-19 15:29:34 +00:00
Bryan Boreham
71ec252298
Merge pull request #2066 from weaveworks/2058-idempotent-rmpeer
...
make 'rmpeer' report on size of transferred range, and not fail
2016-03-19 15:10:58 +00:00
Bryan Boreham
b1ec2b788a
Bump template name so it will fetch latest Docker
2016-03-19 14:12:17 +00:00
Bryan Boreham
f11314ed3e
Introduce 'Count' type to avoid abusing 'Offset'
2016-03-19 11:47:34 +00:00
Bryan Boreham
e080f00354
Review feedback
2016-03-18 19:40:16 +00:00
Bryan Boreham
b00f0aee65
Check errors on test for root namespace
2016-03-18 19:39:52 +00:00
Bryan Boreham
88cb07203a
Improve name of cni_volume_options and include them when running the CNI plugin inside a container
2016-03-18 19:02:28 +00:00
Bryan Boreham
4903c2b23c
Remove unnecessary netns switch for router in attach_router,
...
and improve the name of the function which sends existing
container data into the router
2016-03-17 20:32:41 +00:00
Bryan Boreham
c8ca295cda
CNI plugin smoke test
2016-03-17 18:20:29 +00:00
Bryan Boreham
4e09889cab
Make container_pid a common test function
2016-03-17 18:20:29 +00:00
Bryan Boreham
a66543f98e
Use link ParentIndex where available
2016-03-17 18:20:18 +00:00
Bryan Boreham
0705319f25
Return failure from various functions when sub-operation fails.
...
We cannot rely on `set -e` to fail the whole script in contexts
where functions are called inside conditionals.
2016-03-17 15:02:40 +00:00
Bryan Boreham
b153e6a0d2
Simplify, after review feedback
2016-03-17 14:29:34 +00:00
Bryan Boreham
ef892fd4ed
Docs for CNI plugins
2016-03-17 14:29:34 +00:00
Bryan Boreham
024eb46c7d
CNI plugin implemented as script that docker runs plugin container,
...
installed via `weave setup`
2016-03-17 14:29:33 +00:00
Bryan Boreham
ecdd7aa7ce
Configure arp cache on new interface
2016-03-17 14:29:33 +00:00
Bryan Boreham
2d6a916b2d
Find weave veths by looking at what is connected to the bridge, not by name
...
and don't even look at containers running in the root namespace
2016-03-17 12:41:37 +00:00
Bryan Boreham
011fb55e5f
Refactor FindNetDevs so we can get the link, and re-use parts of the function
2016-03-17 12:41:37 +00:00
Bryan Boreham
ac4e87418a
Set a default route via bridge if config doesn't specify any
2016-03-17 12:41:14 +00:00
Bryan Boreham
42ff61f97c
CNI net plugin
2016-03-17 12:41:14 +00:00
Bryan Boreham
08059412b5
Refactor so we can call parts individually
2016-03-17 12:41:14 +00:00
Bryan Boreham
f9615c34dc
CNI IPAM plugin
2016-03-17 12:41:14 +00:00
Bryan Boreham
703b8dfd11
Expose 'ipam' type so we can refer to it elsewhere
2016-03-17 12:08:37 +00:00
Bryan Boreham
b86e6412fa
Don't try to parse return from DELETE address
2016-03-17 12:06:34 +00:00
Bryan Boreham
4eaeb0f30c
Merge branch '1.4'
2016-03-16 14:52:59 +00:00
Bryan Boreham
9c096526b8
Merge pull request #2049 from weaveworks/issues/2016-retry-docker-event-subscription
...
Retry docker event subscription
2016-03-16 14:38:27 +00:00
Bryan Boreham
eee77d49d1
Claim IP takes CIDR not IP
2016-03-16 14:22:39 +00:00
Bryan Boreham
d2d1d2b43a
Test for docker network subnets and IPs
2016-03-16 13:47:30 +00:00
Bryan Boreham
c80bf7e996
Bump template name so it will fetch latest Docker
2016-03-16 13:14:40 +00:00
Bryan Boreham
dd505a8e17
Merge pull request #2038 from weaveworks/wp-markdown-plugin-fixes
...
Doc fixes required by updated WP markdown plugin
2016-03-16 12:46:50 +00:00
Bryan Boreham
35671135bd
Return errors that happen inside WithNetNS
2016-03-10 15:18:16 +00:00
Bryan Boreham
a57335738d
Don't do unnecessary clock skew check in IPAM
2016-03-10 11:41:47 +00:00
Bryan Boreham
3ad9d8e785
Don't fail start if image is missing
2016-03-09 17:10:20 +00:00
Bryan Boreham
0009b05635
Improve naming of 'release' function in IPAM API
2016-03-07 16:24:53 +00:00
Bryan Boreham
f2e38ae6c5
Abstract out logging function from weave api package to reduce dependencies
2016-03-07 15:37:51 +00:00
Bryan Boreham
b83f4a00ed
Merge pull request #1997 from weaveworks/issues/1994-weave-consense
...
Implement `weave consense`
2016-03-03 15:26:02 -08:00
Bryan Boreham
7c65b6e3bb
Merge pull request #1990 from weaveworks/issues/1743-restricted-electorate
...
Support non-electing peers via --observer
2016-03-03 10:46:58 -08:00
Bryan Boreham
824329d4c9
Fix up unit tests to look at CIDRs instead of addresses.
2016-03-02 17:21:52 -08:00
Bryan Boreham
604309fb53
Parse CIDR strings without separating into subnet and address
2016-03-02 17:21:52 -08:00
Bryan Boreham
73f1a04d5f
Deal in subnets, not ranges, when requesting address allocation
2016-03-02 17:21:51 -08:00
Bryan Boreham
b76e2a87cf
Store address+subnet prefix for 'owned' addresses
2016-03-02 17:21:24 -08:00
Bryan Boreham
b6eec08247
Return all applicable results from Lookup
...
and stop erroring on Lookup not found; just return a blank result
2016-03-02 17:01:12 -08:00
Bryan Boreham
03563e847e
Remember addresses outside of the allocation range
2016-03-02 17:01:12 -08:00
Bryan Boreham
4c159a9af6
Merge pull request #1973 from weaveworks/issues/678-persist-owned2
...
Persist 'owned' addresses in IPAM
2016-03-02 16:58:23 -08:00
Bryan Boreham
bc61838aaa
Merge pull request #2015 from weaveworks/1-5-edits2
...
Reorganization of docs for WordPress
2016-03-02 16:24:14 -08:00
Bryan Boreham
8c9937b0be
Fix up some wording and links
2016-03-02 15:39:06 -08:00
Bryan Boreham
95cbc8940e
Sync 'owned' data with existing containers at startup
2016-03-02 11:35:24 -08:00
Bryan Boreham
f29716387f
Persist the 'owned' address set
2016-03-02 11:35:24 -08:00
Bryan Boreham
532a6b69d9
Merge pull request #1672 from weaveworks/vagrant-pin-docker
...
Pin docker version in vagrant VM
2016-03-01 14:15:05 -08:00
Bryan Boreham
f2ef5e880a
Merge pull request #1982 from weaveworks/issues/578-pid-equals-host
...
Use --pid=host
2016-03-01 12:41:52 -08:00
Bryan Boreham
dd74bb1774
Simplify by using GetFromPid
2016-03-01 12:12:46 -08:00
Bryan Boreham
cb01e3f87b
Typo
2016-02-29 15:08:55 -08:00
Bryan Boreham
590c1dde1d
Merge branch '1.4'
2016-02-29 15:04:12 -08:00
Bryan Boreham
be3f88656b
Add release v1.4.5
2016-02-29 22:28:58 +00:00
Bryan Boreham
246f394731
Merge branch '1.4'
2016-02-29 14:07:02 -08:00
Bryan Boreham
7453c7a5dd
Merge branch '1.4'
2016-02-29 08:22:22 -08:00
Bryan Boreham
ce4857f5dc
Merge pull request #2001 from weaveworks/issues/1996-try-all-pending-allocations
...
Try all pending allocations - LGTM. Fixes #1996
2016-02-29 08:20:49 -08:00
Bryan Boreham
f17d50cc50
Check the exact version of the image, not the base
2016-02-26 23:44:04 +00:00
Bryan Boreham
436f8ef7c8
Compare the environment so we can detect a change in password
2016-02-26 23:41:57 +00:00
Bryan Boreham
65f435f042
Smoke-test for restarts
2016-02-26 23:41:57 +00:00
Bryan Boreham
561c8d012c
Treat a restarting container like a running one, for idempotency
2016-02-26 23:41:46 +00:00
Bryan Boreham
bb4c0f5247
Start existing container, if its image and arguments match
2016-02-26 23:40:02 +00:00
Bryan Boreham
b064bcce49
Log when command-line peer list overridden by persisted list
...
Reworked interface to router so we split setting up the initial list
from beginning to make connections - we shouldn't do that until
after router.Start().
2016-02-19 14:29:33 +00:00
Bryan Boreham
b442567406
Add two functions required by ipamapi "contract" but not actually used
2016-02-18 15:29:10 +00:00
Bryan Boreham
ba8926a6ea
Persist set of peers to connect to
2016-02-17 18:12:16 +00:00
Bryan Boreham
546f9592f9
Hard-fail on persistence errors, otherwise the network can get confused on a restart.
...
Create `Allocator.fatalf()`, for consistency
2016-02-12 18:12:26 +00:00
Bryan Boreham
06f3793f05
Remove persisted IPAM ring data on peerName change
2016-02-12 18:12:26 +00:00
Bryan Boreham
f396c60402
Persist the Ring
2016-02-12 18:12:26 +00:00
Bryan Boreham
ad036499eb
Add db infra to IPAM
2016-02-12 18:12:26 +00:00
Bryan Boreham
38c6eb28e8
Add basic infrastructure to use BoltDB for persistence
2016-02-12 18:12:26 +00:00
Bryan Boreham
7bbc9f1b82
Don't remove the weave network on shutdown because it bricks Docker 1.10
2016-02-09 10:02:06 +00:00
Bryan Boreham
9386c01845
Wait for multicast route on any interface, to match weave script
...
which only adds a route if there isn't one already
2016-02-08 14:04:25 +00:00
Bryan Boreham
ed3c50f43e
Merge pull request #1951 from weaveworks/issues/1940-remove-proxy-dockerbridgeip-dep
...
Use netlink instead of shelling out to `weave docker-bridge-ip`
2016-02-08 11:05:10 +00:00
Bryan Boreham
9ac62e8005
Extract common getenv-testing code
2016-02-08 10:46:18 +00:00
Bryan Boreham
034da376c4
Make error messages on ring merge clearer
2016-02-08 10:13:41 +00:00
Bryan Boreham
f9f6649f90
Check some ring entries via AllRangeInfo, to improve coverage
2016-02-04 15:12:13 +00:00
Bryan Boreham
a5c9898884
Checking for existing entries is pointless when the Ring starts empty
2016-02-04 15:12:13 +00:00
Bryan Boreham
839eb28310
Unit test for ring.ClaimForPeers
2016-02-04 15:11:46 +00:00
Bryan Boreham
07b79568dd
Resurrect apparently-dead containers on ContainerStarted event
2016-02-04 13:49:43 +00:00
Bryan Boreham
1d3c80ab49
Merge pull request #1944 from weaveworks/issues/1940-remove-proxy-weaveps-dep
...
Use netlink instead of shelling out to `weave ps`
2016-02-04 13:45:58 +00:00
Bryan Boreham
38013d2f41
Kill zombies
2016-02-04 12:52:16 +00:00
Bryan Boreham
71da517e88
Refactor to collect all code that touches alloc.owned
2016-02-02 13:57:12 +00:00
Bryan Boreham
0a4b3a04ba
Wait for plugin status via unix socket
2016-02-01 10:11:46 +00:00
Bryan Boreham
78f2d82984
Extract function to listen on Unix socket
2016-02-01 10:11:46 +00:00
Bryan Boreham
c2a869491f
Check State.Restarting as well as State.Running
2016-01-29 17:41:02 +00:00
Bryan Boreham
a750ef8033
Don't check if container is running when we only want its ID.
...
This avoids trying to decide if "restarting" is as good as "running".
In wait_for_status we now explitly check_running, and
in dns_add/remove we add an extra check_running test.
2016-01-29 17:41:02 +00:00
Bryan Boreham
3c6211f9f2
Don't rm old containers, in case we want the log
2016-01-29 15:07:14 +00:00
Bryan Boreham
b9502ee1cd
Check if container is running before using its image to ask for version
2016-01-29 14:43:02 +00:00
Bryan Boreham
e4828ad30a
Remove 'nameserver' option
2016-01-29 14:03:04 +00:00
Bryan Boreham
ea50b3d5cc
Create a different weavevolumes container for each Weave version.
...
They will be named 'weavevolumes-v1.4.3', 'weavevolumes-latest', etc.
Use a label to identify these containers so they can all be removed on `weave reset`.
2016-01-29 12:22:22 +00:00
Bryan Boreham
3297b93edb
Smoke-test 'weave ps' and restarting when using plugin
2016-01-29 12:13:00 +00:00
Bryan Boreham
6d0e867ad0
Capture addresses from veths with prefix 'ethwe'
...
This is to address the plugin case, where the veth will have a name like 'ethwe0'.
Previously we only looked at the device named exactly 'ethwe'.
Covers `weave ps` and reclaim of addresses for IPAM and WeaveDNS.
2016-01-29 12:13:00 +00:00
Bryan Boreham
1cea9c1c87
Extract function to detect container running in host namespace
2016-01-29 12:13:00 +00:00
Bryan Boreham
3320a9e7d4
Re-organise code so we can clean up using defer and return error codes to top level
2016-01-29 11:41:24 +00:00
Bryan Boreham
9b90a938f5
Remove Unix domain sockets on shutdown
2016-01-28 18:26:34 +00:00
Bryan Boreham
c0ece16881
Don't need to rm the network here because 'weave reset' does it
2016-01-28 17:55:27 +00:00
Bryan Boreham
598efe5d1a
Reduce docker volumes for weavewait to just one set.
...
- Create an auxilliary container 'weavevolumes' to hold the '/w/w'
files, and map into that instead of creating new volumes every time.
- Show "/bin/false" as its command in `docker ps` instead of
"/home/weave/sigproxy".
- Remove volumes when cleaning up smoketest containers.
2016-01-28 15:57:22 +00:00
Bryan Boreham
482045aed8
Send back an http error code with any plugin errors.
2016-01-27 14:53:26 +00:00
Bryan Boreham
610a90c727
Claim address requested by caller
2016-01-27 12:11:01 +00:00