diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-10-25 20:22:20 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-10-25 20:22:20 +0000 |
commit | 1dfaf48b0ecd8da3e673cdece573c5519aeee2e7 (patch) | |
tree | 5f37643fdd85b726b1c6a224f0ad133da71b6381 /pkg/shim/service.go | |
parent | dcc0a8f024f1a7bbe43c84c499d8f72f779e1428 (diff) | |
parent | 9262ea47a5d93d44b14f298663982b75ed2e4898 (diff) |
Merge release-20211019.0-33-g9262ea47a (automated)
Diffstat (limited to 'pkg/shim/service.go')
-rw-r--r-- | pkg/shim/service.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pkg/shim/service.go b/pkg/shim/service.go index 0980d964e..8e5aea739 100644 --- a/pkg/shim/service.go +++ b/pkg/shim/service.go @@ -49,6 +49,7 @@ import ( "github.com/sirupsen/logrus" "golang.org/x/sys/unix" "gvisor.dev/gvisor/pkg/cleanup" + "gvisor.dev/gvisor/pkg/shim/runtimeoptions/v14" "gvisor.dev/gvisor/pkg/shim/proc" "gvisor.dev/gvisor/pkg/shim/runsc" @@ -344,7 +345,15 @@ func (s *service) Create(ctx context.Context, r *taskAPI.CreateTaskRequest) (*ta // A config file in runtime root is not required. path = "" } - case *runtimeoptions.Options: // containerd 1.3.x+ + case *runtimeoptions.Options: // containerd 1.5+ + if o.ConfigPath == "" { + break + } + if o.TypeUrl != optionsType { + return nil, fmt.Errorf("unsupported option type %q", o.TypeUrl) + } + path = o.ConfigPath + case *v14.Options: // containerd 1.4- if o.ConfigPath == "" { break } |