add truncindex

fix #222

Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
This commit is contained in:
yanxuean
2017-09-09 09:25:31 +08:00
parent 0e6e593481
commit 5ee3423820
18 changed files with 1452 additions and 116 deletions

View File

@@ -142,7 +142,9 @@ func (c *criContainerdService) PullImage(ctx context.Context, r *runtime.PullIma
img.RepoTags = []string{repoTag}
}
c.imageStore.Add(img)
if err := c.imageStore.Add(img); err != nil {
return nil, fmt.Errorf("failed to add image %q into store: %v", img.ID, err)
}
// NOTE(random-liu): the actual state in containerd is the source of truth, even we maintain
// in-memory image store, it's only for in-memory indexing. The image could be removed