From 16b75f899eed82b5750f4ba4e6f9007d9bae7a55 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Tue, 10 May 2016 16:03:08 +0100 Subject: [PATCH] Move sleep on reset from IPAM Allocator to weave script --- ipam/allocator.go | 1 - weave | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/ipam/allocator.go b/ipam/allocator.go index d5ce2530..2c64f3e6 100644 --- a/ipam/allocator.go +++ b/ipam/allocator.go @@ -419,7 +419,6 @@ func (alloc *Allocator) Shutdown() { alloc.persistRing() alloc.space.Clear() alloc.gossip.GossipBroadcast(alloc.Gossip()) - time.Sleep(100 * time.Millisecond) } doneChan <- struct{}{} } diff --git a/weave b/weave index 3aa24402..6ebd4efc 100755 --- a/weave +++ b/weave @@ -2308,6 +2308,7 @@ EOF plugin_disabled || util_op remove-plugin-network weave || warn_plugin_active warn_if_stopping_proxy_in_env call_weave DELETE /peer >/dev/null 2>&1 || true + fractional_sleep 0.5 # Allow some time for broadcast updates to go out for NAME in $PLUGIN_CONTAINER_NAME $CONTAINER_NAME $PROXY_CONTAINER_NAME ; do docker stop $NAME >/dev/null 2>&1 || true docker rm -f $NAME >/dev/null 2>&1 || true