1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

fix race in serializing sandbox to string

Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>
This commit is contained in:
Alexander Morozov 2016-10-04 15:40:47 -07:00
parent ffd13e32a8
commit 7a51c79979

View file

@ -868,8 +868,9 @@ func (c *controller) NewSandbox(containerID string, options ...SandboxOption) (s
if s.containerID == containerID {
// If not a stub, then we already have a complete sandbox.
if !s.isStub {
sbID := s.ID()
c.Unlock()
return nil, types.ForbiddenErrorf("container %s is already present: %v", containerID, s)
return nil, types.ForbiddenErrorf("container %s is already present in sandbox %s", containerID, sbID)
}
// We already have a stub sandbox from the