Leave container allocations for a time after death

so they will be reclaimed if the container is restarted.
Still cancel pending operations immediately a container dies
This commit is contained in:
Bryan Boreham committed 2016-01-12 14:38:44 +00:00
1 parent 4672e9ec1f
commit f84b933d7c
5 files changed
+76 -29

No files matched your search

+2
View File
@@ -26,6 +26,8 @@ func (g *allocate) Try(alloc *Allocator) bool {
}
if addr, found := alloc.lookupOwned(g.ident, g.r); found {
// If we had heard that this container died, resurrect it
delete(alloc.dead, g.ident) // delete is no-op if key not in map
g.resultChan <- allocateResult{addr, nil}
return true
}