Add shim cgroup support for v2 runtimes

Closes #3198

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2019-05-20 15:10:21 +00:00
parent 90c6c1af43
commit fe6a2b03ed
4 changed files with 81 additions and 10 deletions

View File

@@ -133,10 +133,6 @@ func TestShimInCgroup(t *testing.T) {
t.Fatal(err)
}
defer client.Close()
if CheckRuntime(client.runtime, "io.containerd.runc") {
t.Skip()
}
var (
ctx, cancel = testContext()
id = t.Name()
@@ -160,12 +156,7 @@ func TestShimInCgroup(t *testing.T) {
}
defer cg.Delete()
task, err := container.NewTask(ctx, empty(), func(_ context.Context, client *Client, r *TaskInfo) error {
r.Options = &runctypes.CreateOptions{
ShimCgroup: path,
}
return nil
})
task, err := container.NewTask(ctx, empty(), WithShimCgroup(path))
if err != nil {
t.Fatal(err)
}