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:
1 parent
4672e9ec1f
commit
f84b933d7c
5 files changed
+76
-29
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user