Fix bundle removal with the reappearance of state dir

Bundle removal now requires removing both workdir and path locations on
delete in shim.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
This commit is contained in:
Phil Estes
2017-08-07 17:50:22 -04:00
parent 738c22a756
commit c8cd3d9080
2 changed files with 15 additions and 4 deletions

View File

@@ -211,7 +211,7 @@ func (r *Runtime) Delete(ctx context.Context, c runtime.Task) (*runtime.Exit, er
}
r.tasks.Delete(ctx, lc)
bundle := loadBundle(filepath.Join(r.state, namespace, lc.id), namespace, r.events)
bundle := loadBundle(filepath.Join(r.state, namespace, lc.id), filepath.Join(r.root, namespace, lc.id), namespace, r.events)
if err := bundle.Delete(); err != nil {
return nil, err
}
@@ -262,7 +262,7 @@ func (r *Runtime) loadTasks(ctx context.Context, ns string) ([]*Task, error) {
continue
}
id := path.Name()
bundle := loadBundle(filepath.Join(r.state, ns, id), ns, r.events)
bundle := loadBundle(filepath.Join(r.state, ns, id), filepath.Join(r.root, ns, id), ns, r.events)
s, err := bundle.Connect(ctx, r.remote)
if err != nil {