From 6889c3276c6895a8440dc8883b8cd608793199f3 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Mon, 9 May 2016 15:17:10 -0700 Subject: [PATCH] Fix containerd proto for connection Signed-off-by: Michael Crosby --- integration-cli/docker_cli_daemon_experimental_test.go | 6 +++--- integration-cli/docker_cli_daemon_test.go | 2 +- libcontainerd/remote_linux.go | 7 ++++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/integration-cli/docker_cli_daemon_experimental_test.go b/integration-cli/docker_cli_daemon_experimental_test.go index fea887d720..b191f07222 100644 --- a/integration-cli/docker_cli_daemon_experimental_test.go +++ b/integration-cli/docker_cli_daemon_experimental_test.go @@ -33,7 +33,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithKilledRunningContainer(t *check } // kill the container - runCmd := exec.Command(ctrBinary, "--address", "/var/run/docker/libcontainerd/docker-containerd.sock", "containers", "kill", cid) + runCmd := exec.Command(ctrBinary, "--address", "unix:///var/run/docker/libcontainerd/docker-containerd.sock", "containers", "kill", cid) if out, ec, err := runCommandWithOutput(runCmd); err != nil { t.Fatalf("Failed to run ctr, ExitCode: %d, err: '%v' output: '%s' cid: '%s'\n", ec, err, out, cid) } @@ -120,7 +120,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithPausedRunningContainer(t *check } // kill the container - runCmd := exec.Command(ctrBinary, "--address", "/var/run/docker/libcontainerd/docker-containerd.sock", "containers", "pause", cid) + runCmd := exec.Command(ctrBinary, "--address", "unix:///var/run/docker/libcontainerd/docker-containerd.sock", "containers", "pause", cid) if out, ec, err := runCommandWithOutput(runCmd); err != nil { t.Fatalf("Failed to run ctr, ExitCode: %d, err: '%v' output: '%s' cid: '%s'\n", ec, err, out, cid) } @@ -170,7 +170,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithUnpausedRunningContainer(t *che } // resume the container - runCmd := exec.Command(ctrBinary, "--address", "/var/run/docker/libcontainerd/docker-containerd.sock", "containers", "resume", cid) + runCmd := exec.Command(ctrBinary, "--address", "unix:///var/run/docker/libcontainerd/docker-containerd.sock", "containers", "resume", cid) if out, ec, err := runCommandWithOutput(runCmd); err != nil { t.Fatalf("Failed to run ctr, ExitCode: %d, err: '%v' output: '%s' cid: '%s'\n", ec, err, out, cid) } diff --git a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_cli_daemon_test.go index 13327d5265..edf56171c9 100644 --- a/integration-cli/docker_cli_daemon_test.go +++ b/integration-cli/docker_cli_daemon_test.go @@ -1550,7 +1550,7 @@ func (s *DockerDaemonSuite) TestCleanupMountsAfterDaemonAndContainerKill(c *chec c.Assert(strings.Contains(string(mountOut), id), check.Equals, true, comment) // kill the container - runCmd := exec.Command(ctrBinary, "--address", "/var/run/docker/libcontainerd/docker-containerd.sock", "containers", "kill", id) + runCmd := exec.Command(ctrBinary, "--address", "unix:///var/run/docker/libcontainerd/docker-containerd.sock", "containers", "kill", id) if out, ec, err := runCommandWithOutput(runCmd); err != nil { c.Fatalf("Failed to run ctr, ExitCode: %d, err: %v output: %s id: %s\n", ec, err, out, id) } diff --git a/libcontainerd/remote_linux.go b/libcontainerd/remote_linux.go index 84d419d07d..d19372d7bd 100644 --- a/libcontainerd/remote_linux.go +++ b/libcontainerd/remote_linux.go @@ -349,7 +349,12 @@ func (r *remote) runContainerdDaemon() error { } // Start a new instance - args := []string{"-l", r.rpcAddr, "--runtime", "docker-runc", "--metrics-interval=0"} + args := []string{ + "-l", fmt.Sprintf("unix://%s", r.rpcAddr), + "--shim", "docker-containerd-shim", + "--runtime", "docker-runc", + "--metrics-interval=0", + } if r.debugLog { args = append(args, "--debug") }