Merge pull request #1495 from LK4D4/fix_sb_race

fix race in serializing sandbox to string
This commit is contained in:
Santhosh Manohar 2016-10-13 13:16:59 -07:00 committed by GitHub
commit 393afa7aad
1 changed files with 2 additions and 1 deletions

View File

@ -882,8 +882,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