Remove sandbox truncindex.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2017-06-05 20:59:50 +00:00
parent a393f3a084
commit 4317e6119a
15 changed files with 13 additions and 126 deletions

View File

@@ -64,16 +64,6 @@ func (c *criContainerdService) RunPodSandbox(ctx context.Context, r *runtime.Run
c.sandboxNameIndex.ReleaseByName(name)
}
}()
// Register the sandbox id.
if err := c.sandboxIDIndex.Add(id); err != nil {
return nil, fmt.Errorf("failed to insert sandbox id %q: %v", id, err)
}
defer func() {
// Delete the sandbox id if the function returns with an error.
if retErr != nil {
c.sandboxIDIndex.Delete(id) // nolint: errcheck
}
}()
// Create initial sandbox metadata.
meta := metadata.SandboxMetadata{