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
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
Matthias Radestock
9c2e9bab14
cosmetic(ish) refactor
2016-03-18 02:42:53 +00:00