Martynas Pumputis
d698aefbfc
Make Claim to block if the IPAM ring is not established
2016-05-09 12:48:41 +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
b1aa52b3ed
Merge pull request #2238 from weaveworks/missing-persist
...
Persist the IPAM ring on `weave reset` and `weave rmpeer`
2016-05-05 14:41:53 +01:00
Adam Harrison
1283ba4f61
Merge pull request #2249 from weaveworks/issues/2209-depersist-on-range-change
...
Better deleting of persisted IPAM data
2016-05-05 10:11:22 +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
6847a3551d
Persist the ring in Shutdown() and AdminTakeoverRanges().
...
Also make AdminTakeoverRanges cause pending ops to be retried.
2016-05-03 17:23:00 +01:00
Bryan Boreham
70bd0ade45
Identifier "_" is address, not cidr
2016-05-03 15:47:45 +01:00
Bryan Boreham
8405e0759a
Clarify the function of the periodic ticker.
...
- it either retries for consensus or retries operations we would have tried previously.
There is no point retrying pending operations if we are waiting for consensus.
2016-05-03 15:13:20 +01:00
Bryan Boreham
5ac8cc74d3
Refactor nested if-statements as switch
2016-05-03 13:52:36 +01:00
Bryan Boreham
f6966548eb
Delete persisted data when IPAM range changes
2016-05-03 13:20:04 +01:00
Bryan Boreham
fb3ed9c1a6
Re-organise checking of persisted data so the failure paths bail out
...
of the function first.
Also bail out if there is no persisted ring, since persisted 'owned'
data isn't meaningful in that state.
2016-05-03 13:20:04 +01:00
Bryan Boreham
61fc5d56fb
Refactor: move initialisation in the case that we don't use persisted data
...
out from loadPersistedData().
2016-05-03 13:20:04 +01:00
Bryan Boreham
e96b68f0aa
Don't use persisted data until we are sure it matches
2016-05-03 13:20:04 +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
Bryan Boreham
984ba8a377
Extend 'owned' structure to store IsContainer flag
2016-04-18 10:13:09 +01:00
Bryan Boreham
01be916c37
Add test to expose problem deleting non-container IPs
...
and check dead containers are removed
2016-04-18 10:13:09 +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
Adam Harrison
a09986baa2
Rename consense -> prime
2016-04-14 12:46:03 +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
695babf7ba
make Allocator.Stop() idempotent and non-blocking
...
So that tests don't have to be careful about ensuring that allocators
are stopped exactly once, or rely on the magic mesh.ChannelSize for
non-blocking behaviour.
2016-04-11 12:32:01 +01:00
Bryan Boreham
ecf1887e5b
Initialize Paxos quorum to 0 until this node needs to request consensus.
...
With a 0 quorum we will participate in voting, but will not actively
try to form a ring.
2016-04-11 11:42:24 +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
c12a52d20e
Better log and status messages for Paxos observer
2016-04-07 12:50:52 +01:00
Bryan Boreham
0c59de40e7
Refactor Paxos status call to remove type assertion
2016-04-07 12:12:08 +01:00
Matthias Radestock
2e31087818
dump state on paxos test failure
...
to help diagnosis of #2132 and similar problems
2016-04-06 08:55:49 +01:00
Adam Harrison
436dc01f52
Merge pull request #2070 from weaveworks/issues/1721-quorum-callback
...
Use current target list to compute quorum
2016-03-29 11:11:30 +01:00
Bryan Boreham
aab86c38b7
Merge pull request #2093 from weaveworks/tools
...
Update tools to get misspell integration. Aho-Corasick FTW!
2016-03-24 14:09:45 +00:00
Bryan Boreham
cfa9b4f638
Assert that paxos quorum is set
2016-03-24 12:06:59 +00:00
Bryan Boreham
2b617633ae
Compute quorum based on the dynamic number of target peers
2016-03-24 12:06:59 +00:00
Matthias Radestock
b8abb22833
Merge branch '1.4'
2016-03-23 16:39:17 +00:00
Tom Wilkie
7a7867ae16
Fix spelling mistakes.
2016-03-23 16:09:43 +00:00
Bryan Boreham
6bc199a8bc
Change invariant fail on Merge() from panic to error
2016-03-23 15:26:26 +00:00
Adam Harrison
e9081c6607
Allow specification of initial IPAM ring via --ipam-seed
2016-03-21 09:49:54 +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
Matthias Radestock
9f10b21c9c
use Space.NumFreeAddresses for calculating transferred ip count
...
...rather than Space.NumFreeAddressesInRange; we don't care about the
universe.
Alternatively we could make Space.AddRanges return the count. But
AddRanges doesn't know whether the ranges overlap with existing free
space - that is only guaranteed by the context - so would have to do
much the same before/after calculation.
Another alternative would be to add the range sizes in
AdminTakeoverRanges. But that is more code and less clear.
2016-03-19 14:41:36 +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
Matthias Radestock
c48eefa82d
refactor(ish): extract allocator logging commonality
...
and add warnf
2016-03-19 14:32:54 +00:00
Matthias Radestock
65eff683dd
Merge branch '1.4'
2016-03-19 14:30:38 +00:00
Matthias Radestock
f42e275884
broadcast ipam ring update after rmpeer
...
So that other peers notice the change more promptly.
Fixes #2068 .
2016-03-19 13:57:20 +00:00
Bryan Boreham
f11314ed3e
Introduce 'Count' type to avoid abusing 'Offset'
2016-03-19 11:47:34 +00:00
Matthias Radestock
bc7539c4ad
cosmetic: consistency
2016-03-18 11:56:10 +00:00