Add all pids to state output
Also update libcontainer dep Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
d6bd304c92
commit
532697f32f
123 changed files with 11277 additions and 547 deletions
|
@ -221,15 +221,28 @@ func createAPIContainer(c runtime.Container) (*types.Container, error) {
|
|||
},
|
||||
})
|
||||
}
|
||||
pids, err := c.Pids()
|
||||
if err != nil {
|
||||
return nil, grpc.Errorf(codes.Internal, "get all pids for container")
|
||||
}
|
||||
return &types.Container{
|
||||
Id: c.ID(),
|
||||
BundlePath: c.Path(),
|
||||
Processes: procs,
|
||||
Labels: c.Labels(),
|
||||
Status: string(c.State()),
|
||||
Pids: toUint32(pids),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func toUint32(its []int) []uint32 {
|
||||
o := []uint32{}
|
||||
for _, i := range its {
|
||||
o = append(o, uint32(i))
|
||||
}
|
||||
return o
|
||||
}
|
||||
|
||||
func (s *apiServer) UpdateContainer(ctx context.Context, r *types.UpdateContainerRequest) (*types.UpdateContainerResponse, error) {
|
||||
e := supervisor.NewEvent(supervisor.UpdateContainerEventType)
|
||||
e.ID = r.Id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue