diff --git a/ipam/allocator.go b/ipam/allocator.go index 404716ec..8479d443 100644 --- a/ipam/allocator.go +++ b/ipam/allocator.go @@ -650,8 +650,8 @@ func (alloc *Allocator) establishRing() { func (alloc *Allocator) createRing(peers []mesh.PeerName) { alloc.debugln("Paxos consensus:", peers) alloc.ring.ClaimForPeers(normalizeConsensus(peers)) - alloc.gossip.GossipBroadcast(alloc.Gossip()) alloc.ringUpdated() + alloc.gossip.GossipBroadcast(alloc.Gossip()) } func (alloc *Allocator) ringUpdated() { diff --git a/ipam/allocator_test.go b/ipam/allocator_test.go index c851a344..4234858c 100644 --- a/ipam/allocator_test.go +++ b/ipam/allocator_test.go @@ -176,6 +176,7 @@ func TestAllocatorClaim(t *testing.T) { alloc.Prime() // Do an allocate on the other peer, which we will try to claim later addrx, err := allocs[0].Allocate(container1, subnet, true, returnFalse) + router.Flush() // Now try the claim again err = alloc.Claim(container3, addr1, true, true)