Fix sandbox container snapshotter.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2017-08-30 18:33:49 +00:00
parent 2aea0388be
commit c4d95aa2c4
6 changed files with 30 additions and 11 deletions

View File

@@ -131,10 +131,11 @@ func (c *criContainerdService) RunPodSandbox(ctx context.Context, r *runtime.Run
specOpts = append(specOpts, containerd.WithUserID(uint32(uid.GetValue())))
}
opts := []containerd.NewContainerOpts{
containerd.WithSnapshotter(c.snapshotter),
containerd.WithNewSnapshotView(id, image.Image),
containerd.WithSpec(spec, specOpts...),
containerd.WithContainerLabels(labels),
containerd.WithRuntime(defaultRuntime),
containerd.WithNewSnapshotView(id, image.Image)}
containerd.WithRuntime(defaultRuntime)}
container, err := c.client.NewContainer(ctx, id, opts...)
if err != nil {
return nil, fmt.Errorf("failed to create containerd container: %v", err)