Fix api servers creation and daemon start order

* daemon creation wasn't parallel to request buffering
* it was possible that empty volume will be created in
  /var/run/docker.sock by some container

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 08230703fdd0f7bcd9a87a0d61d88fdf2b901e66
Component: engine
This commit is contained in:
Alexander Morozov
2015-05-07 15:38:02 -07:00
parent 2ee6387cbc
commit 6da49015e7
2 changed files with 35 additions and 25 deletions
@@ -1160,3 +1160,13 @@ func pingContainers(c *check.C, d *Daemon, expectFailure bool) {
args = append(dargs, "rm", "-f", "container1")
runCommand(exec.Command(dockerBinary, args...))
}
func (s *DockerDaemonSuite) TestDaemonRestartWithSockerAsVolume(c *check.C) {
c.Assert(s.d.StartWithBusybox(), check.IsNil)
socket := filepath.Join(s.d.folder, "docker.sock")
out, err := s.d.Cmd("run", "-d", "-v", socket+":/sock", "busybox")
c.Assert(err, check.IsNil, check.Commentf("Output: %s", out))
c.Assert(s.d.Restart(), check.IsNil)
}