From 5e74cba0f0f858b1c0eb32b1a0c6e93437cc9b1f Mon Sep 17 00:00:00 2001 From: Lantao Liu Date: Thu, 26 Oct 2017 23:37:17 +0000 Subject: [PATCH] Add log of generated id for debugging. Signed-off-by: Lantao Liu --- pkg/server/container_create.go | 1 + pkg/server/sandbox_run.go | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/server/container_create.go b/pkg/server/container_create.go index fd1e49f6d..763a5bb9b 100644 --- a/pkg/server/container_create.go +++ b/pkg/server/container_create.go @@ -89,6 +89,7 @@ func (c *criContainerdService) CreateContainer(ctx context.Context, r *runtime.C // the same container. id := util.GenerateID() name := makeContainerName(config.GetMetadata(), sandboxConfig.GetMetadata()) + glog.V(4).Infof("Generated id %q for container %q", id, name) if err = c.containerNameIndex.Reserve(name, id); err != nil { return nil, fmt.Errorf("failed to reserve container name %q: %v", name, err) } diff --git a/pkg/server/sandbox_run.go b/pkg/server/sandbox_run.go index c51bba612..a82799eec 100644 --- a/pkg/server/sandbox_run.go +++ b/pkg/server/sandbox_run.go @@ -51,6 +51,7 @@ func (c *criContainerdService) RunPodSandbox(ctx context.Context, r *runtime.Run // Generate unique id and name for the sandbox and reserve the name. id := util.GenerateID() name := makeSandboxName(config.GetMetadata()) + glog.V(4).Infof("Generated id %q for sandbox %q", id, name) // Reserve the sandbox name to avoid concurrent `RunPodSandbox` request starting the // same sandbox. if err := c.sandboxNameIndex.Reserve(name, id); err != nil {