72 Commits
Author SHA1 Message Date
Raj Chaudhuri c1d3107418 Changed module name, edited default manifests in prog/weave-kube
* Module name changed to `github.com/rajch/weave`
* Added environment variable `CHECKPOINT_DISABLE=1` to default manifests, to bypass weaveworks telemetry
2024-03-01 18:05:19 +05:30
Bryan Boreham df52117bfa Remove unused code 2020-07-31 09:03:27 +00:00
Bryan Boreham e9310eba98 Don't use '_' as container ID in claim outside range
And added unit test for various claim-without-ID situations
2017-06-07 16:38:19 +00:00
Bryan Boreham 8f27f8f442 Clean up some tests that were not checking results 2017-03-21 11:38:35 +00:00
Bryan Boreham 7075b5d9fd Extend pre-existing address reclaim to docker containers 2017-02-13 11:30:34 +00:00
Bryan Boreham 39ac1a0037 Collect existing weave addresses at start-up, to avoid a race when
doing it from the script

Note we need to run weaver in the host pid namespace, so it can search
for existing container IPs. Also now we are firing off sub-processes
it's better to not be PID 1 so Linux doesn't expect us to reap zombies.
2017-02-10 15:10:02 +00:00
Bryan Boreham 1ec2c0fb3f Use a CIDR-aligned CIDR in unit tests 2016-05-13 16:27:28 +01:00
Bryan Boreham 64dc7a1f69 Donate power-of-2-aligned ranges instead of just slicing at the mid-point.
Also fix up space tests to match.
2016-05-13 16:27:28 +01:00
Bryan Boreham de9597b6fa Merge branch '1.5' 2016-05-09 14:38:00 +01:00
Martynas Pumputis d698aefbfc Make Claim to block if the IPAM ring is not established 2016-05-09 12:48:41 +01:00
Matthias Radestock 438efcccda Merge branch '1.5' 2016-05-07 20:19:18 +01:00
Matthias Radestock daa369b86c refactor: extract a couple of helpers in allocator tests
to reduce repetition
2016-05-07 20:18:21 +01:00
Matthias Radestock 32ba82efaf Merge branch '1.5' 2016-05-05 14:50:00 +01:00
Bryan Boreham 3252a25e00 Broadcast initial ring after persisting it, in case we die between those operations 2016-05-03 17:23:00 +01:00
Bryan Boreham 76601fed09 Fix up merge in unit test 2016-04-25 12:28:47 +01:00
Bryan Boreham 88a044f7f9 Merge pull request #2184 from weaveworks/2181-excessive-ring-frag
prevent excessive ring fragmentation due to repeated space requests. Fixes #2181
2016-04-25 11:54:12 +01:00
Bryan Boreham d32fc495c8 Merge branch '1.4' 2016-04-18 14:08:04 +01:00
Bryan Boreham d3635eed77 Need to mock-gossip from the end of the chain 2016-04-18 14:06:38 +01:00
Adam Harrison 6ad9dac71a Merge pull request #2165 from weaveworks/issues/2164-less-deleting
Store 'checkAlive' flag in IPAM, so we don't delete non-container IDs
2016-04-18 11:49:50 +01:00
Bryan Boreham 8253d17529 Merge branch '1.4' 2016-04-18 10:58:39 +01:00
Bryan Boreham d3be3d8912 Remove outdated comment 2016-04-18 10:53:55 +01:00
Bryan Boreham 5e4ab7f307 Plumb isContainer through Claim calls 2016-04-18 10:16:54 +01:00
Bryan Boreham 2b159b0c75 Pass checkAlive flag through as isContainer in Allocate 2016-04-18 10:16:54 +01:00
Matthias Radestock 27632b118f prevent excessive ring fragmentation due to repeated space requests
Merging a ring now indicates whether the ring has been updated. This
prevents excessive allocation retries, which in turn can result in
repeated space requests - i.e. if an allocation cannot proceed due to
lack of space - which in turn can result in excessive ring
fragmentation since many of the requests will result in the creation
of a new ring entries, due to the need to split ranges.

Fixes #2181.
2016-04-17 12:40:18 +01:00
Matthias Radestock 0e54de63cc cosmetic 2016-04-17 09:33:52 +01:00
Matthias Radestock c0c5906d07 fix simulation of periodic gossip in TestTransfer
`GossipBroadcast` in the `TestRouter` only goes one hop. In
`TestTransfer` the three peers are connected in a chain, and hence we
need to take extra care to ensure propagation to all peers.

Fixes #2180.
2016-04-16 10:11:06 +01:00
Matthias Radestock 8f54f83285 refactor: align test allocator names with indices
for easier debugging
2016-04-16 09:12:49 +01:00
Bryan Boreham 61b0d0ba9e Merge pull request #2149 from weaveworks/stop-test-router
stop ipam tests from leaking routers
2016-04-11 13:34:21 +01:00
Bryan Boreham c10d26cf02 Fix up TestBootstrap after consensus changes 2016-04-11 13:20:54 +01:00
Matthias Radestock 4d352d6eb1 stop router created by makeNetworkOfAllocators
so that unit tests don't leave garbage behind
2016-04-10 11:22:57 +01: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
Matthias Radestock 62d823850c make rmpeer report on size of transferred space, and not fail
Closes #2058.
2016-03-19 14:40:26 +00:00
Bryan Boreham f11314ed3e Introduce 'Count' type to avoid abusing 'Offset' 2016-03-19 11:47:34 +00:00
Bryan Boreham a57335738d Don't do unnecessary clock skew check in IPAM 2016-03-10 11:41:47 +00:00
Martynas Pumputis 9cfc104fc7 Add TestSpaceRequest test for allocator
Checks whether a donating peer does not leave one ip address
behind a block it donates (#2009).
2016-03-03 08:36:14 -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 73f1a04d5f Deal in subnets, not ranges, when requesting address allocation 2016-03-02 17:21:51 -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 f84b933d7c Leave container allocations for a time after death
so they will be reclaimed if the container is restarted.
Still cancel pending operations immediately a container dies
2016-01-12 14:38:44 +00:00
Matthias Radestock 751ccd02f6 don't stall in ipam on early container death
When a container died before we got into the allocation code (inside
the allocator run loop) we would not cancel the allocation since the
container death event will have been processed by the allocator before
it had any knowledge of the container.

The fix is to move the container-aliveness check inside the allocation
code. That way we still detect the death even if the event has already
flown past.

We only need to perform the check once, since any subsequent death
will result in an event that is processed by the allocator when it has
recorded the container in its state.

Fixes #1459.
2015-10-07 15:20:22 +01:00
Bryan Boreham d55c68c248 Review feedback 2015-09-15 16:18:37 +01:00
Bryan Boreham a7e0f03647 Use explicit index into operations slice in cancelOpsFor()
to avoid mis-indexing when more than one op is removed
2015-09-14 17:02:35 +01:00
Tom Wilkie 4df3d7f150 Reduce the amount of parallelism in the ipam tests 2015-07-29 10:13:02 +00:00
Michael Bridgen 5389e31190 Merge branch '687-detect-ipam-clash' of github.com:weaveworks/weave into pr1200 2015-07-27 11:54:31 +01:00
Tom Wilkie a12d63bb12 Make ipam test less stressful, so it doesn't timeout. 2015-07-22 12:53:27 +00:00
Bryan Boreham 647b755b64 Check manually-assigned addresses with IPAM to see if they clash 2015-07-21 17:02:52 +01:00
Bryan Boreham 4c5920a50a Add fuzz-test for Claim 2015-07-16 16:12:23 +01:00
Bryan Boreham af7ca99dc4 Extend unit-tests for claim operation 2015-07-16 16:12:23 +01:00
Bryan Boreham 273a0fba47 Add sender to mock broadcast messages 2015-07-15 13:05:25 +01:00
Bryan Boreham acf13dc157 Add sender to OnGossipBroadcast() 2015-07-15 12:07:56 +01:00