diff --git a/api/grpc/server/server.go b/api/grpc/server/server.go index 32393e5..2d50667 100644 --- a/api/grpc/server/server.go +++ b/api/grpc/server/server.go @@ -47,8 +47,14 @@ func (s *apiServer) CreateContainer(ctx context.Context, c *types.CreateContaine if err := <-e.Err; err != nil { return nil, err } - <-e.StartResponse - return &types.CreateContainerResponse{}, nil + r := <-e.StartResponse + apiC, err := createAPIContainer(r.Container) + if err != nil { + return nil, err + } + return &types.CreateContainerResponse{ + Container: apiC, + }, nil } func (s *apiServer) Signal(ctx context.Context, r *types.SignalRequest) (*types.SignalResponse, error) { @@ -178,41 +184,49 @@ func (s *apiServer) State(ctx context.Context, r *types.StateRequest) (*types.St }, } for _, c := range e.Containers { - processes, err := c.Processes() + apiC, err := createAPIContainer(c) if err != nil { - return nil, grpc.Errorf(codes.Internal, "get processes for container") + return nil, err } - var procs []*types.Process - for _, p := range processes { - oldProc := p.Spec() - stdio := p.Stdio() - procs = append(procs, &types.Process{ - Pid: p.ID(), - SystemPid: uint32(p.SystemPid()), - Terminal: oldProc.Terminal, - Args: oldProc.Args, - Env: oldProc.Env, - Cwd: oldProc.Cwd, - Stdin: stdio.Stdin, - Stdout: stdio.Stdout, - Stderr: stdio.Stderr, - User: &types.User{ - Uid: oldProc.User.UID, - Gid: oldProc.User.GID, - AdditionalGids: oldProc.User.AdditionalGids, - }, - }) - } - state.Containers = append(state.Containers, &types.Container{ - Id: c.ID(), - BundlePath: c.Path(), - Processes: procs, - Status: string(c.State()), - }) + state.Containers = append(state.Containers, apiC) } return state, nil } +func createAPIContainer(c runtime.Container) (*types.Container, error) { + processes, err := c.Processes() + if err != nil { + return nil, grpc.Errorf(codes.Internal, "get processes for container") + } + var procs []*types.Process + for _, p := range processes { + oldProc := p.Spec() + stdio := p.Stdio() + procs = append(procs, &types.Process{ + Pid: p.ID(), + SystemPid: uint32(p.SystemPid()), + Terminal: oldProc.Terminal, + Args: oldProc.Args, + Env: oldProc.Env, + Cwd: oldProc.Cwd, + Stdin: stdio.Stdin, + Stdout: stdio.Stdout, + Stderr: stdio.Stderr, + User: &types.User{ + Uid: oldProc.User.UID, + Gid: oldProc.User.GID, + AdditionalGids: oldProc.User.AdditionalGids, + }, + }) + } + return &types.Container{ + Id: c.ID(), + BundlePath: c.Path(), + Processes: procs, + Status: string(c.State()), + }, nil +} + func (s *apiServer) UpdateContainer(ctx context.Context, r *types.UpdateContainerRequest) (*types.UpdateContainerResponse, error) { e := supervisor.NewEvent(supervisor.UpdateContainerEventType) e.ID = r.Id diff --git a/api/grpc/types/api.pb.go b/api/grpc/types/api.pb.go index 2e81e76..1775291 100644 --- a/api/grpc/types/api.pb.go +++ b/api/grpc/types/api.pb.go @@ -100,6 +100,7 @@ func (*CreateContainerRequest) ProtoMessage() {} func (*CreateContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } type CreateContainerResponse struct { + Container *Container `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"` } func (m *CreateContainerResponse) Reset() { *m = CreateContainerResponse{} } @@ -107,6 +108,13 @@ func (m *CreateContainerResponse) String() string { return proto.Comp func (*CreateContainerResponse) ProtoMessage() {} func (*CreateContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +func (m *CreateContainerResponse) GetContainer() *Container { + if m != nil { + return m.Container + } + return nil +} + type SignalRequest struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Pid string `protobuf:"bytes,2,opt,name=pid" json:"pid,omitempty"` @@ -1139,100 +1147,101 @@ var _API_serviceDesc = grpc.ServiceDesc{ } var fileDescriptor0 = []byte{ - // 1509 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x58, 0xd9, 0x72, 0x1b, 0x45, - 0x17, 0xb6, 0xa4, 0x91, 0x2c, 0x1d, 0x2d, 0xb6, 0xc7, 0x4b, 0x64, 0xe5, 0xcf, 0x9f, 0x30, 0x04, - 0x92, 0xa2, 0x52, 0xae, 0xe0, 0xb0, 0x84, 0x70, 0x01, 0xc1, 0x49, 0x25, 0x50, 0x09, 0xb8, 0x62, - 0x9b, 0x2a, 0x6e, 0x50, 0x8d, 0x67, 0x1a, 0xa9, 0xf1, 0x6c, 0xcc, 0xf4, 0x78, 0x29, 0xde, 0x80, - 0x5b, 0x9e, 0x83, 0x2a, 0xae, 0x78, 0x00, 0x9e, 0x80, 0xe7, 0xe0, 0x29, 0x38, 0xbd, 0xcd, 0xa6, - 0x25, 0xe4, 0x82, 0x1b, 0x55, 0x75, 0xf7, 0x59, 0xbe, 0xf3, 0x9d, 0x65, 0xba, 0x05, 0x1d, 0x3b, - 0xa2, 0x7b, 0x51, 0x1c, 0xb2, 0xd0, 0x6c, 0xb2, 0xab, 0x88, 0x24, 0xd6, 0x29, 0x6c, 0x9d, 0x44, - 0xae, 0xcd, 0xc8, 0x61, 0x1c, 0x3a, 0x24, 0x49, 0x5e, 0x91, 0x9f, 0x52, 0x92, 0x30, 0x13, 0xa0, - 0x4e, 0xdd, 0x61, 0xed, 0x56, 0xed, 0x6e, 0xc7, 0xec, 0x42, 0x23, 0xc2, 0x45, 0x5d, 0x2c, 0xf0, - 0xc4, 0xf1, 0xc2, 0x84, 0x1c, 0x31, 0x97, 0x06, 0xc3, 0x06, 0xee, 0xb5, 0xcd, 0x3e, 0x34, 0x2f, - 0xa8, 0xcb, 0xa6, 0x43, 0x03, 0x97, 0x7d, 0x73, 0x00, 0xad, 0x29, 0xa1, 0x93, 0x29, 0x1b, 0x36, - 0xf9, 0xda, 0xba, 0x06, 0xdb, 0x15, 0x1f, 0x49, 0x14, 0x06, 0x09, 0xb1, 0x7e, 0x86, 0x9d, 0x83, - 0x98, 0xe0, 0xc1, 0x41, 0x18, 0x30, 0x9b, 0x06, 0x24, 0x9e, 0xe7, 0x1e, 0x17, 0xa7, 0x69, 0xe0, - 0x7a, 0xe4, 0xd0, 0x46, 0x17, 0x39, 0x8a, 0x29, 0x71, 0xce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 0x00, 0xff, 0xff, 0x20, 0x9e, 0x7a, - 0x04, 0x1f, 0x11, 0x00, 0x00, + // 1526 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, + 0x20, 0x71, 0x83, 0xb5, 0xd9, 0x1d, 0xec, 0x21, 0x7b, 0x62, 0x77, 0x36, 0x89, 0xc5, 0x1b, 0x70, + 0xcb, 0x73, 0x20, 0x71, 0xc5, 0x03, 0xf0, 0x04, 0x3c, 0x07, 0x4f, 0xc1, 0x37, 0x87, 0x1d, 0xef, + 0xae, 0x0f, 0xa5, 0x17, 0xdc, 0x58, 0x9a, 0x99, 0xef, 0xf0, 0xfb, 0x7e, 0xdf, 0x61, 0x67, 0x0c, + 0x2d, 0x3b, 0xa2, 0xfb, 0x51, 0x1c, 0xb2, 0xd0, 0xac, 0xb3, 0x49, 0x44, 0x12, 0xeb, 0x0c, 0xb6, + 0x4e, 0x23, 0xd7, 0x66, 0xe4, 0x28, 0x0e, 0x1d, 0x92, 0x24, 0xaf, 0xc8, 0x4f, 0x29, 0x49, 0x98, + 0x09, 0x50, 0xa5, 0x6e, 0xbf, 0x72, 0xb3, 0x72, 0xb7, 0x65, 0xb6, 0xa1, 0x16, 0xe1, 0xa2, 0x2a, + 0x16, 0x78, 0xe2, 0x78, 0x61, 0x42, 0x8e, 0x99, 0x4b, 0x83, 0x7e, 0x0d, 0xf7, 0x9a, 0x66, 0x17, + 0xea, 0x97, 0xd4, 0x65, 0xe3, 0xbe, 0x81, 0xcb, 0x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0xbe, 0x26, 0xec, + 0x32, 0x8c, 0xcf, 0x79, 0x86, 0x92, 0x52, 0xcb, 0x62, 0x99, 0xc7, 0x57, 0xc3, 0xb3, 0x09, 0xc3, + 0x9a, 0x10, 0xa9, 0xe4, 0xf1, 0xe0, 0xce, 0x91, 0x2d, 0x1b, 0xb5, 0x26, 0xf6, 0xb0, 0x6e, 0x5f, + 0x5d, 0x0d, 0xb1, 0x0a, 0xc3, 0x58, 0xf6, 0xae, 0x10, 0xc3, 0x2d, 0x37, 0x0e, 0xa3, 0x88, 0xc8, + 0x48, 0x0d, 0x6e, 0xec, 0x24, 0x33, 0xd6, 0xc8, 0xa4, 0x70, 0x27, 0x52, 0xc6, 0x56, 0x33, 0x63, + 0x27, 0xda, 0x58, 0x33, 0x27, 0x96, 0x19, 0x6b, 0x89, 0x92, 0xf2, 0xa1, 0x79, 0x18, 0xa5, 0xa7, + 0x89, 0x3d, 0x22, 0x7c, 0x7a, 0xb0, 0x90, 0xd9, 0xde, 0x30, 0xe5, 0x4b, 0x01, 0xdd, 0x30, 0xb7, + 0xa0, 0x13, 0x91, 0x18, 0x8b, 0x52, 0xed, 0x56, 0x91, 0x28, 0xc3, 0xbc, 0x06, 0x9b, 0x62, 0x39, + 0xa4, 0xc1, 0xf0, 0x9c, 0xc4, 0x01, 0xf1, 0xfc, 0xd0, 0x25, 0x2a, 0x8e, 0x3d, 0xd8, 0xd0, 0x87, + 0xbc, 0x97, 0xc5, 0x91, 0x88, 0xc7, 0x3a, 0x81, 0xde, 0xc9, 0x18, 0x6f, 0x14, 0xcc, 0xa3, 0xc1, + 0xe8, 0x89, 0xcd, 0x6c, 0x73, 0x0d, 0xf3, 0x44, 0x62, 0x1a, 0xba, 0x89, 0x72, 0x88, 0xda, 0x4c, + 0x8a, 0x10, 0x77, 0x98, 0x1d, 0x49, 0xd2, 0xf0, 0x1b, 0x31, 0x3d, 0x62, 0xd4, 0x57, 0x0e, 0xad, + 0xef, 0x45, 0x10, 0x92, 0x78,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b, 0xc3, 0xcc, 0x48, 0x9a, 0xfb, 0x20, 0x1a, 0x5c, 0x5f, 0x70, + 0xaa, 0x0d, 0xbe, 0x2f, 0x1b, 0x01, 0x6f, 0x2e, 0x59, 0xce, 0x72, 0xcf, 0x92, 0xc1, 0x56, 0x71, + 0x53, 0x6b, 0xdd, 0x87, 0x86, 0xbc, 0x8f, 0xea, 0x02, 0x28, 0x5c, 0x4f, 0x07, 0x9d, 0xfc, 0xae, + 0xb5, 0x72, 0xbf, 0x82, 0x33, 0xaf, 0xf9, 0x8c, 0x30, 0xd9, 0x1d, 0x79, 0x57, 0x33, 0x2a, 0x62, + 0x93, 0xab, 0x9c, 0x35, 0xc4, 0xff, 0x26, 0x0f, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x74, 0x42, + 0xdf, 0x97, 0x44, 0x11, 0x00, 0x00, } diff --git a/api/grpc/types/api.proto b/api/grpc/types/api.proto index f886d8f..e26ac7f 100644 --- a/api/grpc/types/api.proto +++ b/api/grpc/types/api.proto @@ -37,6 +37,7 @@ message CreateContainerRequest { } message CreateContainerResponse { + Container container = 1; } message SignalRequest { diff --git a/supervisor/event.go b/supervisor/event.go index 2704dc5..9a01a9c 100644 --- a/supervisor/event.go +++ b/supervisor/event.go @@ -37,6 +37,7 @@ func NewEvent(t EventType) *Event { } type StartResponse struct { + Container runtime.Container } type Event struct { diff --git a/supervisor/worker.go b/supervisor/worker.go index 30ab65d..bc524ef 100644 --- a/supervisor/worker.go +++ b/supervisor/worker.go @@ -65,6 +65,8 @@ func (w *worker) Start() { } ContainerStartTimer.UpdateSince(started) t.Err <- nil - t.StartResponse <- StartResponse{} + t.StartResponse <- StartResponse{ + Container: t.Container, + } } }