From ddd039761d98f737c1597a3d44ec5a0f8abeb4b2 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Thu, 16 Jun 2016 18:04:51 +0100 Subject: [PATCH] Handle Docker daemon named 'dockerd' --- prog/weaveutil/docker_tls_args.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/prog/weaveutil/docker_tls_args.go b/prog/weaveutil/docker_tls_args.go index 83dff5ec..01afe805 100644 --- a/prog/weaveutil/docker_tls_args.go +++ b/prog/weaveutil/docker_tls_args.go @@ -26,7 +26,12 @@ func dockerTLSArgs(args []string) error { continue } - if comm, err := ioutil.ReadFile(filepath.Join(procRoot, dirName, "comm")); err != nil || string(comm) != "docker\n" { + isDaemon := false + if comm, err := ioutil.ReadFile(filepath.Join(procRoot, dirName, "comm")); err != nil { + continue + } else if string(comm) == "dockerd\n" { + isDaemon = true + } else if string(comm) != "docker\n" { continue } @@ -35,7 +40,6 @@ func dockerTLSArgs(args []string) error { continue } - isDaemon := false tlsArgs := []string{} args := bytes.Split(cmdline, []byte{'\000'}) for i := 0; i < len(args); i++ {