Add Exec IDs

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-06-28 12:54:10 -07:00
parent e283b3802d
commit f93bfb6233
36 changed files with 1441 additions and 2055 deletions

View File

@@ -201,9 +201,9 @@ func (r *Runtime) Create(ctx context.Context, id string, opts runtime.CreateOpts
})
}
if err := r.emit(ctx, "/runtime/create", &eventsapi.RuntimeCreate{
ID: id,
Bundle: bundle.path,
RootFS: runtimeMounts,
ContainerID: id,
Bundle: bundle.path,
RootFS: runtimeMounts,
IO: &eventsapi.RuntimeIO{
Stdin: opts.IO.Stdin,
Stdout: opts.IO.Stdout,
@@ -239,14 +239,14 @@ func (r *Runtime) Delete(ctx context.Context, c runtime.Task) (*runtime.Exit, er
r.tasks.delete(ctx, lc)
var (
bundle = loadBundle(filepath.Join(r.root, namespace, lc.containerID), namespace)
bundle = loadBundle(filepath.Join(r.root, namespace, lc.id), namespace)
i = c.Info()
)
if err := r.emit(ctx, "/runtime/delete", &eventsapi.RuntimeDelete{
ID: i.ID,
Runtime: i.Runtime,
ExitStatus: rsp.ExitStatus,
ExitedAt: rsp.ExitedAt,
ContainerID: i.ID,
Runtime: i.Runtime,
ExitStatus: rsp.ExitStatus,
ExitedAt: rsp.ExitedAt,
}); err != nil {
return nil, err
}
@@ -324,9 +324,9 @@ func (r *Runtime) loadTasks(ctx context.Context, ns string) ([]*Task, error) {
continue
}
o = append(o, &Task{
containerID: id,
shim: s,
namespace: ns,
id: id,
shim: s,
namespace: ns,
})
}
return o, nil