mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fixed an endpoint delete issue with a possible stale sbox
Stale sandbox could be a result of stress tests on ungraceful restarts such as #17984 Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
parent
aade9536b6
commit
423b55c4b4
3 changed files with 3 additions and 3 deletions
|
@ -22,7 +22,7 @@ clone git github.com/vdemeester/shakers 3c10293ce22b900c27acad7b28656196fcc2f73b
|
||||||
clone git golang.org/x/net 47990a1ba55743e6ef1affd3a14e5bac8553615d https://github.com/golang/net.git
|
clone git golang.org/x/net 47990a1ba55743e6ef1affd3a14e5bac8553615d https://github.com/golang/net.git
|
||||||
|
|
||||||
#get libnetwork packages
|
#get libnetwork packages
|
||||||
clone git github.com/docker/libnetwork e8ebc0bf6510343c88d162db08b3d855cbbe75b9
|
clone git github.com/docker/libnetwork b4ddf18317b19d6e4bcc821145589749206a7d00
|
||||||
clone git github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec
|
clone git github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec
|
||||||
clone git github.com/hashicorp/go-msgpack 71c2886f5a673a35f909803f38ece5810165097b
|
clone git github.com/hashicorp/go-msgpack 71c2886f5a673a35f909803f38ece5810165097b
|
||||||
clone git github.com/hashicorp/memberlist 9a1e242e454d2443df330bdd51a436d5a9058fc4
|
clone git github.com/hashicorp/memberlist 9a1e242e454d2443df330bdd51a436d5a9058fc4
|
||||||
|
|
|
@ -584,7 +584,8 @@ func (ep *endpoint) Delete() error {
|
||||||
ep.Lock()
|
ep.Lock()
|
||||||
epid := ep.id
|
epid := ep.id
|
||||||
name := ep.name
|
name := ep.name
|
||||||
if ep.sandboxID != "" {
|
sb, _ := n.getController().SandboxByID(ep.sandboxID)
|
||||||
|
if sb != nil {
|
||||||
ep.Unlock()
|
ep.Unlock()
|
||||||
return &ActiveContainerError{name: name, id: epid}
|
return &ActiveContainerError{name: name, id: epid}
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,7 +176,6 @@ func (n *network) getEndpointsFromStore() ([]*endpoint, error) {
|
||||||
|
|
||||||
for _, kvo := range kvol {
|
for _, kvo := range kvol {
|
||||||
ep := kvo.(*endpoint)
|
ep := kvo.(*endpoint)
|
||||||
ep.network = n
|
|
||||||
epl = append(epl, ep)
|
epl = append(epl, ep)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue