diff --git a/linux/bundle.go b/linux/bundle.go index 66c0cb483..b03dc8733 100644 --- a/linux/bundle.go +++ b/linux/bundle.go @@ -17,10 +17,11 @@ import ( "github.com/pkg/errors" ) -func loadBundle(path, workdir, namespace string, events *events.Exchange) *bundle { +func loadBundle(path, workdir, namespace, id string, events *events.Exchange) *bundle { return &bundle{ path: path, namespace: namespace, + id: id, events: events, workDir: workdir, } diff --git a/linux/runtime.go b/linux/runtime.go index 0430c6943..e8a52c960 100644 --- a/linux/runtime.go +++ b/linux/runtime.go @@ -215,6 +215,7 @@ func (r *Runtime) Delete(ctx context.Context, c runtime.Task) (*runtime.Exit, er filepath.Join(r.state, namespace, lc.id), filepath.Join(r.root, namespace, lc.id), namespace, + lc.id, r.events, ) if err := bundle.Delete(); err != nil { @@ -267,7 +268,8 @@ func (r *Runtime) loadTasks(ctx context.Context, ns string) ([]*Task, error) { continue } id := path.Name() - bundle := loadBundle(filepath.Join(r.state, ns, id), filepath.Join(r.root, ns, id), ns, r.events) + bundle := loadBundle(filepath.Join(r.state, ns, id), + filepath.Join(r.root, ns, id), ns, id, r.events) s, err := bundle.Connect(ctx, r.remote) if err != nil {