diff --git a/libnetwork/sandbox.go b/libnetwork/sandbox.go index c820cc04e9..d9c846c0a5 100644 --- a/libnetwork/sandbox.go +++ b/libnetwork/sandbox.go @@ -626,6 +626,10 @@ func (sb *sandbox) SetKey(basePath string) error { } sb.Lock() + if sb.inDelete { + sb.Unlock() + return types.ForbiddenErrorf("failed to SetKey: sandbox %q delete in progress", sb.id) + } oldosSbox := sb.osSbox sb.Unlock()