From 07b79568dd176b81227c463900339b849988f149 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 22 Jan 2016 12:37:55 +0000 Subject: [PATCH] Resurrect apparently-dead containers on ContainerStarted event --- ipam/allocator.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ipam/allocator.go b/ipam/allocator.go index 6abd3d92..45944310 100644 --- a/ipam/allocator.go +++ b/ipam/allocator.go @@ -263,7 +263,11 @@ func (alloc *Allocator) removeDeadContainers() { } } -func (alloc *Allocator) ContainerStarted(ident string) {} +func (alloc *Allocator) ContainerStarted(ident string) { + alloc.actionChan <- func() { + delete(alloc.dead, ident) // delete is no-op if key not in map + } +} // Delete (Sync) - release all IP addresses for container with given name func (alloc *Allocator) Delete(ident string) error {