updates the execution service to include ContainerID in tasks
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
parent
5157a326fd
commit
f42c762dc4
@ -241,7 +241,7 @@ var runCommand = cli.Command{
|
||||
}
|
||||
}
|
||||
|
||||
createContainer, err := newCreateContainerRequest(context, id, id, spec)
|
||||
createContainer, err := newCreateContainerRequest(context, id, id, ref, spec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -282,10 +282,11 @@ func newContainerSpec(context *cli.Context, config *ocispec.ImageConfig, imageRe
|
||||
return json.Marshal(s)
|
||||
}
|
||||
|
||||
func newCreateContainerRequest(context *cli.Context, id, snapshot string, spec []byte) (*containersapi.CreateContainerRequest, error) {
|
||||
func newCreateContainerRequest(context *cli.Context, id, snapshot, image string, spec []byte) (*containersapi.CreateContainerRequest, error) {
|
||||
create := &containersapi.CreateContainerRequest{
|
||||
Container: containersapi.Container{
|
||||
ID: id,
|
||||
Image: image,
|
||||
Spec: &protobuf.Any{
|
||||
TypeUrl: specs.Version,
|
||||
Value: spec,
|
||||
|
@ -139,10 +139,11 @@ func newContainerSpec(context *cli.Context, config *ocispec.ImageConfig, imageRe
|
||||
return json.Marshal(rtSpec)
|
||||
}
|
||||
|
||||
func newCreateContainerRequest(context *cli.Context, id, snapshot string, spec []byte) (*containersapi.CreateContainerRequest, error) {
|
||||
func newCreateContainerRequest(context *cli.Context, id, snapshot, image string, spec []byte) (*containersapi.CreateContainerRequest, error) {
|
||||
create := &containersapi.CreateContainerRequest{
|
||||
Container: containersapi.Container{
|
||||
ID: id,
|
||||
Image: image,
|
||||
Spec: &protobuf.Any{
|
||||
TypeUrl: specs.Version,
|
||||
Value: spec,
|
||||
|
@ -41,6 +41,7 @@ func newTask(id string, spec []byte, shim shim.ShimClient) *Task {
|
||||
|
||||
func (c *Task) Info() plugin.TaskInfo {
|
||||
return plugin.TaskInfo{
|
||||
ID: c.containerID,
|
||||
ContainerID: c.containerID,
|
||||
Runtime: runtimeName,
|
||||
Spec: c.spec,
|
||||
|
@ -221,6 +221,7 @@ func taskFromContainerd(ctx context.Context, c plugin.Task) (*task.Task, error)
|
||||
}
|
||||
return &task.Task{
|
||||
ID: c.Info().ID,
|
||||
ContainerID: c.Info().ContainerID,
|
||||
Pid: state.Pid(),
|
||||
Status: status,
|
||||
Spec: &protobuf.Any{
|
||||
|
Loading…
Reference in New Issue
Block a user