Skip to content

Commit 423b55c

Browse files
committed
Fixed an endpoint delete issue with a possible stale sbox
Stale sandbox could be a result of stress tests on ungraceful restarts such as moby#17984 Signed-off-by: Madhu Venugopal <[email protected]>
1 parent aade953 commit 423b55c

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

hack/vendor.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ clone git github.com/vdemeester/shakers 3c10293ce22b900c27acad7b28656196fcc2f73b
2222
clone git golang.org/x/net 47990a1ba55743e6ef1affd3a14e5bac8553615d https://github.com/golang/net.git
2323

2424
#get libnetwork packages
25-
clone git github.com/docker/libnetwork e8ebc0bf6510343c88d162db08b3d855cbbe75b9
25+
clone git github.com/docker/libnetwork b4ddf18317b19d6e4bcc821145589749206a7d00
2626
clone git github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec
2727
clone git github.com/hashicorp/go-msgpack 71c2886f5a673a35f909803f38ece5810165097b
2828
clone git github.com/hashicorp/memberlist 9a1e242e454d2443df330bdd51a436d5a9058fc4

vendor/src/github.com/docker/libnetwork/endpoint.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,8 @@ func (ep *endpoint) Delete() error {
584584
ep.Lock()
585585
epid := ep.id
586586
name := ep.name
587-
if ep.sandboxID != "" {
587+
sb, _ := n.getController().SandboxByID(ep.sandboxID)
588+
if sb != nil {
588589
ep.Unlock()
589590
return &ActiveContainerError{name: name, id: epid}
590591
}

vendor/src/github.com/docker/libnetwork/store.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ func (n *network) getEndpointsFromStore() ([]*endpoint, error) {
176176

177177
for _, kvo := range kvol {
178178
ep := kvo.(*endpoint)
179-
ep.network = n
180179
epl = append(epl, ep)
181180
}
182181
}

0 commit comments

Comments
 (0)