Merge pull request #3292 from crosbymichael/shim-cgroup

Add shim cgroup support for v2 runtimes
This commit is contained in:
Derek McGowan
2019-05-22 10:32:47 -07:00
committed by GitHub
7 changed files with 102 additions and 13 deletions

View File

@@ -126,8 +126,13 @@ func (m *TaskManager) Create(ctx context.Context, id string, opts runtime.Create
bundle.Delete()
}
}()
topts := opts.TaskOptions
if topts == nil {
topts = opts.RuntimeOptions
}
b := shimBinary(ctx, bundle, opts.Runtime, m.containerdAddress, m.events, m.tasks)
shim, err := b.Start(ctx, func() {
shim, err := b.Start(ctx, topts, func() {
log.G(ctx).WithField("id", id).Info("shim disconnected")
_, err := m.tasks.Get(ctx, id)
if err != nil {