Pass options on shim create for v2

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2019-05-17 21:02:23 +00:00
parent b99a66c267
commit 90c6c1af43
3 changed files with 21 additions and 3 deletions

View File

@@ -30,6 +30,7 @@ import (
client "github.com/containerd/containerd/runtime/v2/shim"
"github.com/containerd/containerd/runtime/v2/task"
"github.com/containerd/ttrpc"
"github.com/gogo/protobuf/types"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
@@ -52,7 +53,7 @@ type binary struct {
rtTasks *runtime.TaskList
}
func (b *binary) Start(ctx context.Context, onClose func()) (_ *shim, err error) {
func (b *binary) Start(ctx context.Context, opts *types.Any, onClose func()) (_ *shim, err error) {
args := []string{"-id", b.bundle.ID}
if logrus.GetLevel() == logrus.DebugLevel {
args = append(args, "-debug")
@@ -64,6 +65,7 @@ func (b *binary) Start(ctx context.Context, onClose func()) (_ *shim, err error)
b.runtime,
b.containerdAddress,
b.bundle.Path,
opts,
args...,
)
if err != nil {
@@ -126,6 +128,7 @@ func (b *binary) Delete(ctx context.Context) (*runtime.Exit, error) {
b.runtime,
b.containerdAddress,
bundlePath,
nil,
"-id", b.bundle.ID,
"-bundle", b.bundle.Path,
"delete")