summaryrefslogtreecommitdiffhomepage
path: root/pkg/v2/service.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/v2/service.go')
-rw-r--r--pkg/v2/service.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/v2/service.go b/pkg/v2/service.go
index 912798e23..3116c09fe 100644
--- a/pkg/v2/service.go
+++ b/pkg/v2/service.go
@@ -240,6 +240,10 @@ func (s *service) Create(ctx context.Context, r *taskAPI.CreateTaskRequest) (_ *
}
var path string
switch o := v.(type) {
+ case *runctypes.CreateOptions: // containerd 1.2.x
+ opts.IoUid = o.IoUid
+ opts.IoGid = o.IoGid
+ opts.ShimCgroup = o.ShimCgroup
case *runctypes.RuncOptions: // containerd 1.2.x
root := proc.RunscRoot
if o.RuntimeRoot != "" {
@@ -262,7 +266,7 @@ func (s *service) Create(ctx context.Context, r *taskAPI.CreateTaskRequest) (_ *
}
path = o.ConfigPath
default:
- return nil, errors.Errorf("unsupported option type")
+ return nil, errors.Errorf("unsupported option type %q", r.Options.TypeUrl)
}
if path != "" {
if _, err = toml.DecodeFile(path, &opts); err != nil {