From 57f37ca66ea13f84d42cc59dc2775f349ab79f2b Mon Sep 17 00:00:00 2001 From: Lantao Liu Date: Mon, 13 Nov 2017 23:36:12 +0000 Subject: [PATCH] Print full container spec for debugging. Signed-off-by: Lantao Liu --- pkg/server/container_create.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/server/container_create.go b/pkg/server/container_create.go index 5922d5230..4a0c9ccb7 100644 --- a/pkg/server/container_create.go +++ b/pkg/server/container_create.go @@ -31,6 +31,7 @@ import ( "github.com/containerd/containerd/mount" "github.com/containerd/containerd/namespaces" "github.com/containerd/typeurl" + "github.com/davecgh/go-spew/spew" "github.com/golang/glog" imagespec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/opencontainers/runc/libcontainer/devices" @@ -146,7 +147,7 @@ func (c *criContainerdService) CreateContainer(ctx context.Context, r *runtime.C if err != nil { return nil, fmt.Errorf("failed to generate container %q spec: %v", id, err) } - glog.V(4).Infof("Container spec: %+v", spec) + glog.V(4).Infof("Container %q spec: %#+v", id, spew.NewFormatter(spec)) // Set snapshotter before any other options. opts := []containerd.NewContainerOpts{