Add all pids to state output
Also update libcontainer dep Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user