diff --git a/api/grpc/server/server.go b/api/grpc/server/server.go index 2d50667..debaaf8 100644 --- a/api/grpc/server/server.go +++ b/api/grpc/server/server.go @@ -172,6 +172,7 @@ func (s *apiServer) ListCheckpoint(ctx context.Context, r *types.ListCheckpointR func (s *apiServer) State(ctx context.Context, r *types.StateRequest) (*types.StateResponse, error) { e := supervisor.NewEvent(supervisor.GetContainerEventType) + e.ID = r.Id s.sv.SendEvent(e) if err := <-e.Err; err != nil { return nil, err diff --git a/api/grpc/types/api.pb.go b/api/grpc/types/api.pb.go index 1775291..96d2fd5 100644 --- a/api/grpc/types/api.pb.go +++ b/api/grpc/types/api.pb.go @@ -260,6 +260,7 @@ func (m *ListCheckpointResponse) GetCheckpoints() []*Checkpoint { } type StateRequest struct { + Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` } func (m *StateRequest) Reset() { *m = StateRequest{} } @@ -1147,7 +1148,7 @@ var _API_serviceDesc = grpc.ServiceDesc{ } var fileDescriptor0 = []byte{ - // 1526 bytes of a gzipped FileDescriptorProto + // 1524 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x58, 0xdb, 0x6e, 0x1b, 0xc5, 0x1b, 0x8f, 0xed, 0xb5, 0x63, 0x7f, 0x3e, 0x24, 0xd9, 0x9c, 0x1c, 0xf7, 0xdf, 0x7f, 0xcb, 0xb6, 0xd0, 0x0a, 0x55, 0x51, 0x49, 0x39, 0x94, 0x22, 0x01, 0x25, 0xad, 0x5a, 0x50, 0x0b, 0x51, 0x93, @@ -1179,69 +1180,69 @@ var fileDescriptor0 = []byte{ 0xd4, 0x9c, 0xf5, 0x1d, 0xc0, 0x54, 0x40, 0x1b, 0xd7, 0xae, 0xc8, 0x15, 0x65, 0x2a, 0xb1, 0x48, 0x22, 0x73, 0x22, 0xd5, 0x5a, 0x9b, 0xd0, 0x4e, 0x03, 0x7a, 0x75, 0x1c, 0x3a, 0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, 0x5f, 0x2c, 0xf3, 0xf8, 0x6a, 0x78, 0x36, 0x61, 0x58, 0x13, + 0x22, 0x95, 0x3c, 0x1e, 0xdc, 0x39, 0xb2, 0x65, 0xd3, 0xd6, 0xc4, 0x1e, 0xd6, 0xed, 0xab, 0xab, + 0x21, 0x56, 0x61, 0x18, 0xcb, 0x3e, 0x16, 0x62, 0xb8, 0xe5, 0xc6, 0x61, 0x14, 0x11, 0x19, 0xa9, + 0xc1, 0x8d, 0x9d, 0x64, 0xc6, 0x1a, 0x99, 0x14, 0xee, 0x44, 0xca, 0xd8, 0x6a, 0x66, 0xec, 0x44, + 0x1b, 0x6b, 0xe6, 0xc4, 0x32, 0x63, 0x2d, 0x51, 0x52, 0x3e, 0x34, 0x0f, 0xa3, 0xf4, 0x34, 0xb1, + 0x47, 0x84, 0x4f, 0x12, 0x16, 0x32, 0xdb, 0x1b, 0xa6, 0x7c, 0x29, 0xa0, 0x1b, 0xe6, 0x16, 0x74, + 0x22, 0x12, 0x63, 0x51, 0xaa, 0xdd, 0x2a, 0x12, 0x65, 0x98, 0xd7, 0x60, 0x53, 0x2c, 0x87, 0x34, + 0x18, 0x9e, 0x93, 0x38, 0x20, 0x9e, 0x1f, 0xba, 0x44, 0xc5, 0xb1, 0x07, 0x1b, 0xfa, 0x90, 0xf7, + 0xb2, 0x38, 0x12, 0xf1, 0x58, 0x27, 0xd0, 0x3b, 0x19, 0xe3, 0xed, 0x82, 0x79, 0x34, 0x18, 0x3d, + 0xb1, 0x99, 0x6d, 0xae, 0x61, 0x9e, 0x48, 0x4c, 0x43, 0x37, 0x51, 0x0e, 0x51, 0x9b, 0x49, 0x11, + 0xe2, 0x0e, 0xb3, 0x23, 0x49, 0x1a, 0x7e, 0x2f, 0xa6, 0x47, 0x8c, 0xfa, 0xca, 0xa1, 0xf5, 0xbd, + 0x08, 0x42, 0x12, 0x6f, 0xe1, 0x97, 0x59, 0x83, 0x95, 0x5f, 0xe6, 0xb5, 0x2c, 0x5f, 0x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0xcb, 0x46, 0xc0, 0x9b, 0x4b, 0x96, 0xb3, 0xdc, 0x13, 0x65, 0xb0, 0x55, 0xdc, 0xd4, 0x5a, + 0xf7, 0xa1, 0x21, 0xef, 0xa3, 0xba, 0x00, 0x0a, 0xd7, 0xd3, 0x41, 0x27, 0xbf, 0x6b, 0xad, 0xdc, + 0xaf, 0xe0, 0xcc, 0x6b, 0x3e, 0x23, 0x4c, 0x76, 0x47, 0xde, 0xd5, 0x8c, 0x8a, 0xd8, 0xe4, 0x2a, + 0x67, 0x0d, 0xf1, 0x1f, 0xca, 0x83, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x06, 0x77, 0x88, 0xa2, + 0x50, 0x11, 0x00, 0x00, } diff --git a/api/grpc/types/api.proto b/api/grpc/types/api.proto index e26ac7f..fc559fb 100644 --- a/api/grpc/types/api.proto +++ b/api/grpc/types/api.proto @@ -104,6 +104,7 @@ message ListCheckpointResponse { } message StateRequest { + string id = 1; // container id for a single container } message ContainerState { diff --git a/ctr/container.go b/ctr/container.go index 16df91f..78f02b9 100644 --- a/ctr/container.go +++ b/ctr/container.go @@ -59,7 +59,9 @@ var stateCommand = cli.Command{ Usage: "get a raw dump of the containerd state", Action: func(context *cli.Context) { c := getClient(context) - resp, err := c.State(netcontext.Background(), &types.StateRequest{}) + resp, err := c.State(netcontext.Background(), &types.StateRequest{ + Id: context.Args().First(), + }) if err != nil { fatal(err.Error(), 1) } @@ -79,7 +81,9 @@ var listCommand = cli.Command{ func listContainers(context *cli.Context) { c := getClient(context) - resp, err := c.State(netcontext.Background(), &types.StateRequest{}) + resp, err := c.State(netcontext.Background(), &types.StateRequest{ + Id: context.Args().First(), + }) if err != nil { fatal(err.Error(), 1) } diff --git a/runtime/container.go b/runtime/container.go index 081fe22..67e0980 100644 --- a/runtime/container.go +++ b/runtime/container.go @@ -51,6 +51,21 @@ type Stdio struct { Stderr string } +func NewStdio(stdin, stdout, stderr string) Stdio { + for _, s := range []*string{ + &stdin, &stdout, &stderr, + } { + if *s == "" { + *s = "/dev/null" + } + } + return Stdio{ + Stdin: stdin, + Stdout: stdout, + Stderr: stderr, + } +} + // New returns a new container func New(root, id, bundle string) (Container, error) { c := &container{ diff --git a/supervisor/add_process.go b/supervisor/add_process.go index 3f6d34d..2a7951b 100644 --- a/supervisor/add_process.go +++ b/supervisor/add_process.go @@ -18,11 +18,7 @@ func (h *AddProcessEvent) Handle(e *Event) error { if !ok { return ErrContainerNotFound } - process, err := ci.container.Exec(e.Pid, *e.ProcessSpec, runtime.Stdio{ - Stdin: e.Stdin, - Stdout: e.Stdout, - Stderr: e.Stderr, - }) + process, err := ci.container.Exec(e.Pid, *e.ProcessSpec, runtime.NewStdio(e.Stdin, e.Stdout, e.Stderr)) if err != nil { return err } diff --git a/supervisor/get_containers.go b/supervisor/get_containers.go index 0b21e36..aba3400 100644 --- a/supervisor/get_containers.go +++ b/supervisor/get_containers.go @@ -5,6 +5,14 @@ type GetContainersEvent struct { } func (h *GetContainersEvent) Handle(e *Event) error { + if e.ID != "" { + ci := h.s.containers[e.ID] + if ci == nil { + return ErrContainerNotFound + } + e.Containers = append(e.Containers, ci.container) + return nil + } for _, i := range h.s.containers { e.Containers = append(e.Containers, i.container) } diff --git a/supervisor/worker.go b/supervisor/worker.go index bc524ef..4eba0ab 100644 --- a/supervisor/worker.go +++ b/supervisor/worker.go @@ -38,11 +38,7 @@ func (w *worker) Start() { defer w.wg.Done() for t := range w.s.tasks { started := time.Now() - process, err := t.Container.Start(t.Checkpoint, runtime.Stdio{ - Stdin: t.Stdin, - Stdout: t.Stdout, - Stderr: t.Stderr, - }) + process, err := t.Container.Start(t.Checkpoint, runtime.NewStdio(t.Stdin, t.Stdout, t.Stderr)) if err != nil { evt := NewEvent(DeleteEventType) evt.ID = t.Container.ID()