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
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
34b95ee36f
Merge branch '1.5'
2016-05-05 10:11:50 +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
Adam Harrison
5fb6df5219
Merge branch '1.5'
2016-05-04 13:34:06 +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
27bdd3b4ad
Revert "Log the error when something goes wrong requesting a claimed address"
...
This reverts commit 14bc1c987e .
2016-04-29 16:03:41 +01:00
Bryan Boreham
14bc1c987e
Log the error when something goes wrong requesting a claimed address
2016-04-29 16:01:21 +01:00
Bryan Boreham
fd7fcc762e
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-04-29 13:59:25 +01:00
Matthias Radestock
72e134605c
refactor: move pure code outside actor
2016-04-26 20:02:47 +01:00
Matthias Radestock
7cc2a1fe38
refactor: more descriptive function name
2016-04-26 17:33:04 +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
Matthias Radestock
cec88f154e
Merge pull request #2205 from weaveworks/issues/2057-gc-nicknames
...
Add allocator.PeerGone
Fixes #2057
2016-04-22 17:42:43 +01:00
Martynas Pumputis
849edb1768
Add allocator.PeerGone
...
The function is registered within the mesh gc and it is responsible
for removing gone nicknames (#2057 ).
2016-04-22 17:29:27 +01:00
Matthias Radestock
9326775718
remove cruft
2016-04-21 18:59:28 +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
c1d98ba59c
refactor: extract a helper
2016-04-17 12:40:34 +01:00
Matthias Radestock
a1823af745
refactor: make error returns less onerous
2016-04-17 12:40:34 +01:00
Matthias Radestock
4a01d23025
refactor: extract entry merging from ring merging
2016-04-17 12:40:34 +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
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