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

@@ -39,7 +39,7 @@ func (c *criContainerdService) RemovePodSandbox(ctx context.Context, r *runtime.
}
}()
sandbox, err := c.getSandbox(r.GetPodSandboxId())
sandbox, err := c.sandboxStore.Get(r.GetPodSandboxId())
if err != nil {
if !metadata.IsNotExistError(err) {
return nil, fmt.Errorf("an error occurred when try to find sandbox %q: %v",
@@ -117,9 +117,6 @@ func (c *criContainerdService) RemovePodSandbox(ctx context.Context, r *runtime.
return nil, fmt.Errorf("failed to delete sandbox metadata for %q: %v", id, err)
}
// Release the sandbox id from id index.
c.sandboxIDIndex.Delete(id) // nolint: errcheck
// Release the sandbox name reserved for the sandbox.
c.sandboxNameIndex.ReleaseByKey(id)