add support to kill container process by pid
This adds support for signalling a container process by pid. Signed-off-by: Evan Hazlett <ejhazlett@gmail.com> make Ps more extensible Signed-off-by: Evan Hazlett <ejhazlett@gmail.com> ps: windows support Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
parent
fae11b6673
commit
ef158f8b5e
@ -25,6 +25,9 @@
|
|||||||
CloseStdinRequest
|
CloseStdinRequest
|
||||||
PauseRequest
|
PauseRequest
|
||||||
ResumeRequest
|
ResumeRequest
|
||||||
|
PsRequest
|
||||||
|
Ps
|
||||||
|
PsResponse
|
||||||
*/
|
*/
|
||||||
package execution
|
package execution
|
||||||
|
|
||||||
@ -140,13 +143,121 @@ func (*ListResponse) Descriptor() ([]byte, []int) { return fileDescriptorExecuti
|
|||||||
type KillRequest struct {
|
type KillRequest struct {
|
||||||
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||||
Signal uint32 `protobuf:"varint,2,opt,name=signal,proto3" json:"signal,omitempty"`
|
Signal uint32 `protobuf:"varint,2,opt,name=signal,proto3" json:"signal,omitempty"`
|
||||||
All bool `protobuf:"varint,3,opt,name=all,proto3" json:"all,omitempty"`
|
// Types that are valid to be assigned to PidOrAll:
|
||||||
|
// *KillRequest_All
|
||||||
|
// *KillRequest_Pid
|
||||||
|
PidOrAll isKillRequest_PidOrAll `protobuf_oneof:"pid_or_all"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *KillRequest) Reset() { *m = KillRequest{} }
|
func (m *KillRequest) Reset() { *m = KillRequest{} }
|
||||||
func (*KillRequest) ProtoMessage() {}
|
func (*KillRequest) ProtoMessage() {}
|
||||||
func (*KillRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{8} }
|
func (*KillRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{8} }
|
||||||
|
|
||||||
|
type isKillRequest_PidOrAll interface {
|
||||||
|
isKillRequest_PidOrAll()
|
||||||
|
MarshalTo([]byte) (int, error)
|
||||||
|
Size() int
|
||||||
|
}
|
||||||
|
|
||||||
|
type KillRequest_All struct {
|
||||||
|
All bool `protobuf:"varint,3,opt,name=all,proto3,oneof"`
|
||||||
|
}
|
||||||
|
type KillRequest_Pid struct {
|
||||||
|
Pid uint32 `protobuf:"varint,4,opt,name=pid,proto3,oneof"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*KillRequest_All) isKillRequest_PidOrAll() {}
|
||||||
|
func (*KillRequest_Pid) isKillRequest_PidOrAll() {}
|
||||||
|
|
||||||
|
func (m *KillRequest) GetPidOrAll() isKillRequest_PidOrAll {
|
||||||
|
if m != nil {
|
||||||
|
return m.PidOrAll
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *KillRequest) GetAll() bool {
|
||||||
|
if x, ok := m.GetPidOrAll().(*KillRequest_All); ok {
|
||||||
|
return x.All
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *KillRequest) GetPid() uint32 {
|
||||||
|
if x, ok := m.GetPidOrAll().(*KillRequest_Pid); ok {
|
||||||
|
return x.Pid
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// XXX_OneofFuncs is for the internal use of the proto package.
|
||||||
|
func (*KillRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
|
||||||
|
return _KillRequest_OneofMarshaler, _KillRequest_OneofUnmarshaler, _KillRequest_OneofSizer, []interface{}{
|
||||||
|
(*KillRequest_All)(nil),
|
||||||
|
(*KillRequest_Pid)(nil),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func _KillRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
||||||
|
m := msg.(*KillRequest)
|
||||||
|
// pid_or_all
|
||||||
|
switch x := m.PidOrAll.(type) {
|
||||||
|
case *KillRequest_All:
|
||||||
|
t := uint64(0)
|
||||||
|
if x.All {
|
||||||
|
t = 1
|
||||||
|
}
|
||||||
|
_ = b.EncodeVarint(3<<3 | proto.WireVarint)
|
||||||
|
_ = b.EncodeVarint(t)
|
||||||
|
case *KillRequest_Pid:
|
||||||
|
_ = b.EncodeVarint(4<<3 | proto.WireVarint)
|
||||||
|
_ = b.EncodeVarint(uint64(x.Pid))
|
||||||
|
case nil:
|
||||||
|
default:
|
||||||
|
return fmt.Errorf("KillRequest.PidOrAll has unexpected type %T", x)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func _KillRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
|
||||||
|
m := msg.(*KillRequest)
|
||||||
|
switch tag {
|
||||||
|
case 3: // pid_or_all.all
|
||||||
|
if wire != proto.WireVarint {
|
||||||
|
return true, proto.ErrInternalBadWireType
|
||||||
|
}
|
||||||
|
x, err := b.DecodeVarint()
|
||||||
|
m.PidOrAll = &KillRequest_All{x != 0}
|
||||||
|
return true, err
|
||||||
|
case 4: // pid_or_all.pid
|
||||||
|
if wire != proto.WireVarint {
|
||||||
|
return true, proto.ErrInternalBadWireType
|
||||||
|
}
|
||||||
|
x, err := b.DecodeVarint()
|
||||||
|
m.PidOrAll = &KillRequest_Pid{uint32(x)}
|
||||||
|
return true, err
|
||||||
|
default:
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func _KillRequest_OneofSizer(msg proto.Message) (n int) {
|
||||||
|
m := msg.(*KillRequest)
|
||||||
|
// pid_or_all
|
||||||
|
switch x := m.PidOrAll.(type) {
|
||||||
|
case *KillRequest_All:
|
||||||
|
n += proto.SizeVarint(3<<3 | proto.WireVarint)
|
||||||
|
n += 1
|
||||||
|
case *KillRequest_Pid:
|
||||||
|
n += proto.SizeVarint(4<<3 | proto.WireVarint)
|
||||||
|
n += proto.SizeVarint(uint64(x.Pid))
|
||||||
|
case nil:
|
||||||
|
default:
|
||||||
|
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
type EventsRequest struct {
|
type EventsRequest struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,6 +322,31 @@ func (m *ResumeRequest) Reset() { *m = ResumeRequest{} }
|
|||||||
func (*ResumeRequest) ProtoMessage() {}
|
func (*ResumeRequest) ProtoMessage() {}
|
||||||
func (*ResumeRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{15} }
|
func (*ResumeRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{15} }
|
||||||
|
|
||||||
|
type PsRequest struct {
|
||||||
|
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *PsRequest) Reset() { *m = PsRequest{} }
|
||||||
|
func (*PsRequest) ProtoMessage() {}
|
||||||
|
func (*PsRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{16} }
|
||||||
|
|
||||||
|
type Ps struct {
|
||||||
|
Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"`
|
||||||
|
RuntimeData *google_protobuf1.Any `protobuf:"bytes,2,opt,name=runtime_data,json=runtimeData" json:"runtime_data,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Ps) Reset() { *m = Ps{} }
|
||||||
|
func (*Ps) ProtoMessage() {}
|
||||||
|
func (*Ps) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{17} }
|
||||||
|
|
||||||
|
type PsResponse struct {
|
||||||
|
Ps []*Ps `protobuf:"bytes,1,rep,name=ps" json:"ps,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *PsResponse) Reset() { *m = PsResponse{} }
|
||||||
|
func (*PsResponse) ProtoMessage() {}
|
||||||
|
func (*PsResponse) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{18} }
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
proto.RegisterType((*CreateRequest)(nil), "containerd.v1.services.CreateRequest")
|
proto.RegisterType((*CreateRequest)(nil), "containerd.v1.services.CreateRequest")
|
||||||
proto.RegisterType((*CreateResponse)(nil), "containerd.v1.services.CreateResponse")
|
proto.RegisterType((*CreateResponse)(nil), "containerd.v1.services.CreateResponse")
|
||||||
@ -228,6 +364,9 @@ func init() {
|
|||||||
proto.RegisterType((*CloseStdinRequest)(nil), "containerd.v1.services.CloseStdinRequest")
|
proto.RegisterType((*CloseStdinRequest)(nil), "containerd.v1.services.CloseStdinRequest")
|
||||||
proto.RegisterType((*PauseRequest)(nil), "containerd.v1.services.PauseRequest")
|
proto.RegisterType((*PauseRequest)(nil), "containerd.v1.services.PauseRequest")
|
||||||
proto.RegisterType((*ResumeRequest)(nil), "containerd.v1.services.ResumeRequest")
|
proto.RegisterType((*ResumeRequest)(nil), "containerd.v1.services.ResumeRequest")
|
||||||
|
proto.RegisterType((*PsRequest)(nil), "containerd.v1.services.PsRequest")
|
||||||
|
proto.RegisterType((*Ps)(nil), "containerd.v1.services.Ps")
|
||||||
|
proto.RegisterType((*PsResponse)(nil), "containerd.v1.services.PsResponse")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
@ -253,6 +392,7 @@ type ContainerServiceClient interface {
|
|||||||
CloseStdin(ctx context.Context, in *CloseStdinRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
|
CloseStdin(ctx context.Context, in *CloseStdinRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
|
||||||
Pause(ctx context.Context, in *PauseRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
|
Pause(ctx context.Context, in *PauseRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
|
||||||
Resume(ctx context.Context, in *ResumeRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
|
Resume(ctx context.Context, in *ResumeRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
|
||||||
|
Ps(ctx context.Context, in *PsRequest, opts ...grpc.CallOption) (*PsResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type containerServiceClient struct {
|
type containerServiceClient struct {
|
||||||
@ -394,6 +534,15 @@ func (c *containerServiceClient) Resume(ctx context.Context, in *ResumeRequest,
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *containerServiceClient) Ps(ctx context.Context, in *PsRequest, opts ...grpc.CallOption) (*PsResponse, error) {
|
||||||
|
out := new(PsResponse)
|
||||||
|
err := grpc.Invoke(ctx, "/containerd.v1.services.ContainerService/Ps", in, out, c.cc, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// Server API for ContainerService service
|
// Server API for ContainerService service
|
||||||
|
|
||||||
type ContainerServiceServer interface {
|
type ContainerServiceServer interface {
|
||||||
@ -409,6 +558,7 @@ type ContainerServiceServer interface {
|
|||||||
CloseStdin(context.Context, *CloseStdinRequest) (*google_protobuf.Empty, error)
|
CloseStdin(context.Context, *CloseStdinRequest) (*google_protobuf.Empty, error)
|
||||||
Pause(context.Context, *PauseRequest) (*google_protobuf.Empty, error)
|
Pause(context.Context, *PauseRequest) (*google_protobuf.Empty, error)
|
||||||
Resume(context.Context, *ResumeRequest) (*google_protobuf.Empty, error)
|
Resume(context.Context, *ResumeRequest) (*google_protobuf.Empty, error)
|
||||||
|
Ps(context.Context, *PsRequest) (*PsResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
func RegisterContainerServiceServer(s *grpc.Server, srv ContainerServiceServer) {
|
func RegisterContainerServiceServer(s *grpc.Server, srv ContainerServiceServer) {
|
||||||
@ -634,6 +784,24 @@ func _ContainerService_Resume_Handler(srv interface{}, ctx context.Context, dec
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _ContainerService_Ps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(PsRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ContainerServiceServer).Ps(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/containerd.v1.services.ContainerService/Ps",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ContainerServiceServer).Ps(ctx, req.(*PsRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
var _ContainerService_serviceDesc = grpc.ServiceDesc{
|
var _ContainerService_serviceDesc = grpc.ServiceDesc{
|
||||||
ServiceName: "containerd.v1.services.ContainerService",
|
ServiceName: "containerd.v1.services.ContainerService",
|
||||||
HandlerType: (*ContainerServiceServer)(nil),
|
HandlerType: (*ContainerServiceServer)(nil),
|
||||||
@ -682,6 +850,10 @@ var _ContainerService_serviceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "Resume",
|
MethodName: "Resume",
|
||||||
Handler: _ContainerService_Resume_Handler,
|
Handler: _ContainerService_Resume_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Ps",
|
||||||
|
Handler: _ContainerService_Ps_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{
|
Streams: []grpc.StreamDesc{
|
||||||
{
|
{
|
||||||
@ -985,19 +1157,35 @@ func (m *KillRequest) MarshalTo(dAtA []byte) (int, error) {
|
|||||||
i++
|
i++
|
||||||
i = encodeVarintExecution(dAtA, i, uint64(m.Signal))
|
i = encodeVarintExecution(dAtA, i, uint64(m.Signal))
|
||||||
}
|
}
|
||||||
if m.All {
|
if m.PidOrAll != nil {
|
||||||
dAtA[i] = 0x18
|
nn3, err := m.PidOrAll.MarshalTo(dAtA[i:])
|
||||||
i++
|
if err != nil {
|
||||||
if m.All {
|
return 0, err
|
||||||
dAtA[i] = 1
|
|
||||||
} else {
|
|
||||||
dAtA[i] = 0
|
|
||||||
}
|
}
|
||||||
i++
|
i += nn3
|
||||||
}
|
}
|
||||||
return i, nil
|
return i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *KillRequest_All) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
i := 0
|
||||||
|
dAtA[i] = 0x18
|
||||||
|
i++
|
||||||
|
if m.All {
|
||||||
|
dAtA[i] = 1
|
||||||
|
} else {
|
||||||
|
dAtA[i] = 0
|
||||||
|
}
|
||||||
|
i++
|
||||||
|
return i, nil
|
||||||
|
}
|
||||||
|
func (m *KillRequest_Pid) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
i := 0
|
||||||
|
dAtA[i] = 0x20
|
||||||
|
i++
|
||||||
|
i = encodeVarintExecution(dAtA, i, uint64(m.Pid))
|
||||||
|
return i, nil
|
||||||
|
}
|
||||||
func (m *EventsRequest) Marshal() (dAtA []byte, err error) {
|
func (m *EventsRequest) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
@ -1069,11 +1257,11 @@ func (m *ExecRequest) MarshalTo(dAtA []byte) (int, error) {
|
|||||||
dAtA[i] = 0x32
|
dAtA[i] = 0x32
|
||||||
i++
|
i++
|
||||||
i = encodeVarintExecution(dAtA, i, uint64(m.Spec.Size()))
|
i = encodeVarintExecution(dAtA, i, uint64(m.Spec.Size()))
|
||||||
n3, err := m.Spec.MarshalTo(dAtA[i:])
|
n4, err := m.Spec.MarshalTo(dAtA[i:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
i += n3
|
i += n4
|
||||||
}
|
}
|
||||||
return i, nil
|
return i, nil
|
||||||
}
|
}
|
||||||
@ -1217,6 +1405,93 @@ func (m *ResumeRequest) MarshalTo(dAtA []byte) (int, error) {
|
|||||||
return i, nil
|
return i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *PsRequest) Marshal() (dAtA []byte, err error) {
|
||||||
|
size := m.Size()
|
||||||
|
dAtA = make([]byte, size)
|
||||||
|
n, err := m.MarshalTo(dAtA)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return dAtA[:n], nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *PsRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
var i int
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.ID) > 0 {
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
i++
|
||||||
|
i = encodeVarintExecution(dAtA, i, uint64(len(m.ID)))
|
||||||
|
i += copy(dAtA[i:], m.ID)
|
||||||
|
}
|
||||||
|
return i, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Ps) Marshal() (dAtA []byte, err error) {
|
||||||
|
size := m.Size()
|
||||||
|
dAtA = make([]byte, size)
|
||||||
|
n, err := m.MarshalTo(dAtA)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return dAtA[:n], nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Ps) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
var i int
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.Pid != 0 {
|
||||||
|
dAtA[i] = 0x8
|
||||||
|
i++
|
||||||
|
i = encodeVarintExecution(dAtA, i, uint64(m.Pid))
|
||||||
|
}
|
||||||
|
if m.RuntimeData != nil {
|
||||||
|
dAtA[i] = 0x12
|
||||||
|
i++
|
||||||
|
i = encodeVarintExecution(dAtA, i, uint64(m.RuntimeData.Size()))
|
||||||
|
n5, err := m.RuntimeData.MarshalTo(dAtA[i:])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i += n5
|
||||||
|
}
|
||||||
|
return i, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *PsResponse) Marshal() (dAtA []byte, err error) {
|
||||||
|
size := m.Size()
|
||||||
|
dAtA = make([]byte, size)
|
||||||
|
n, err := m.MarshalTo(dAtA)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return dAtA[:n], nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *PsResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
var i int
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.Ps) > 0 {
|
||||||
|
for _, msg := range m.Ps {
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
i++
|
||||||
|
i = encodeVarintExecution(dAtA, i, uint64(msg.Size()))
|
||||||
|
n, err := msg.MarshalTo(dAtA[i:])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i += n
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return i, nil
|
||||||
|
}
|
||||||
|
|
||||||
func encodeFixed64Execution(dAtA []byte, offset int, v uint64) int {
|
func encodeFixed64Execution(dAtA []byte, offset int, v uint64) int {
|
||||||
dAtA[offset] = uint8(v)
|
dAtA[offset] = uint8(v)
|
||||||
dAtA[offset+1] = uint8(v >> 8)
|
dAtA[offset+1] = uint8(v >> 8)
|
||||||
@ -1369,12 +1644,24 @@ func (m *KillRequest) Size() (n int) {
|
|||||||
if m.Signal != 0 {
|
if m.Signal != 0 {
|
||||||
n += 1 + sovExecution(uint64(m.Signal))
|
n += 1 + sovExecution(uint64(m.Signal))
|
||||||
}
|
}
|
||||||
if m.All {
|
if m.PidOrAll != nil {
|
||||||
n += 2
|
n += m.PidOrAll.Size()
|
||||||
}
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *KillRequest_All) Size() (n int) {
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
n += 2
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
func (m *KillRequest_Pid) Size() (n int) {
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
n += 1 + sovExecution(uint64(m.Pid))
|
||||||
|
return n
|
||||||
|
}
|
||||||
func (m *EventsRequest) Size() (n int) {
|
func (m *EventsRequest) Size() (n int) {
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
@ -1471,6 +1758,41 @@ func (m *ResumeRequest) Size() (n int) {
|
|||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *PsRequest) Size() (n int) {
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
l = len(m.ID)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovExecution(uint64(l))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Ps) Size() (n int) {
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.Pid != 0 {
|
||||||
|
n += 1 + sovExecution(uint64(m.Pid))
|
||||||
|
}
|
||||||
|
if m.RuntimeData != nil {
|
||||||
|
l = m.RuntimeData.Size()
|
||||||
|
n += 1 + l + sovExecution(uint64(l))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *PsResponse) Size() (n int) {
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.Ps) > 0 {
|
||||||
|
for _, e := range m.Ps {
|
||||||
|
l = e.Size()
|
||||||
|
n += 1 + l + sovExecution(uint64(l))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
func sovExecution(x uint64) (n int) {
|
func sovExecution(x uint64) (n int) {
|
||||||
for {
|
for {
|
||||||
n++
|
n++
|
||||||
@ -1580,11 +1902,31 @@ func (this *KillRequest) String() string {
|
|||||||
s := strings.Join([]string{`&KillRequest{`,
|
s := strings.Join([]string{`&KillRequest{`,
|
||||||
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
|
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
|
||||||
`Signal:` + fmt.Sprintf("%v", this.Signal) + `,`,
|
`Signal:` + fmt.Sprintf("%v", this.Signal) + `,`,
|
||||||
|
`PidOrAll:` + fmt.Sprintf("%v", this.PidOrAll) + `,`,
|
||||||
|
`}`,
|
||||||
|
}, "")
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
func (this *KillRequest_All) String() string {
|
||||||
|
if this == nil {
|
||||||
|
return "nil"
|
||||||
|
}
|
||||||
|
s := strings.Join([]string{`&KillRequest_All{`,
|
||||||
`All:` + fmt.Sprintf("%v", this.All) + `,`,
|
`All:` + fmt.Sprintf("%v", this.All) + `,`,
|
||||||
`}`,
|
`}`,
|
||||||
}, "")
|
}, "")
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
func (this *KillRequest_Pid) String() string {
|
||||||
|
if this == nil {
|
||||||
|
return "nil"
|
||||||
|
}
|
||||||
|
s := strings.Join([]string{`&KillRequest_Pid{`,
|
||||||
|
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
|
||||||
|
`}`,
|
||||||
|
}, "")
|
||||||
|
return s
|
||||||
|
}
|
||||||
func (this *EventsRequest) String() string {
|
func (this *EventsRequest) String() string {
|
||||||
if this == nil {
|
if this == nil {
|
||||||
return "nil"
|
return "nil"
|
||||||
@ -1663,6 +2005,37 @@ func (this *ResumeRequest) String() string {
|
|||||||
}, "")
|
}, "")
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
func (this *PsRequest) String() string {
|
||||||
|
if this == nil {
|
||||||
|
return "nil"
|
||||||
|
}
|
||||||
|
s := strings.Join([]string{`&PsRequest{`,
|
||||||
|
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
|
||||||
|
`}`,
|
||||||
|
}, "")
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
func (this *Ps) String() string {
|
||||||
|
if this == nil {
|
||||||
|
return "nil"
|
||||||
|
}
|
||||||
|
s := strings.Join([]string{`&Ps{`,
|
||||||
|
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
|
||||||
|
`RuntimeData:` + strings.Replace(fmt.Sprintf("%v", this.RuntimeData), "Any", "google_protobuf1.Any", 1) + `,`,
|
||||||
|
`}`,
|
||||||
|
}, "")
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
func (this *PsResponse) String() string {
|
||||||
|
if this == nil {
|
||||||
|
return "nil"
|
||||||
|
}
|
||||||
|
s := strings.Join([]string{`&PsResponse{`,
|
||||||
|
`Ps:` + strings.Replace(fmt.Sprintf("%v", this.Ps), "Ps", "Ps", 1) + `,`,
|
||||||
|
`}`,
|
||||||
|
}, "")
|
||||||
|
return s
|
||||||
|
}
|
||||||
func valueToStringExecution(v interface{}) string {
|
func valueToStringExecution(v interface{}) string {
|
||||||
rv := reflect.ValueOf(v)
|
rv := reflect.ValueOf(v)
|
||||||
if rv.IsNil() {
|
if rv.IsNil() {
|
||||||
@ -2640,7 +3013,28 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m.All = bool(v != 0)
|
b := bool(v != 0)
|
||||||
|
m.PidOrAll = &KillRequest_All{b}
|
||||||
|
case 4:
|
||||||
|
if wireType != 0 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType)
|
||||||
|
}
|
||||||
|
var v uint32
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowExecution
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
v |= (uint32(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m.PidOrAll = &KillRequest_Pid{v}
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := skipExecution(dAtA[iNdEx:])
|
skippy, err := skipExecution(dAtA[iNdEx:])
|
||||||
@ -3392,6 +3786,268 @@ func (m *ResumeRequest) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (m *PsRequest) Unmarshal(dAtA []byte) error {
|
||||||
|
l := len(dAtA)
|
||||||
|
iNdEx := 0
|
||||||
|
for iNdEx < l {
|
||||||
|
preIndex := iNdEx
|
||||||
|
var wire uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowExecution
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
wire |= (uint64(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fieldNum := int32(wire >> 3)
|
||||||
|
wireType := int(wire & 0x7)
|
||||||
|
if wireType == 4 {
|
||||||
|
return fmt.Errorf("proto: PsRequest: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: PsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowExecution
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
stringLen |= (uint64(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
intStringLen := int(stringLen)
|
||||||
|
if intStringLen < 0 {
|
||||||
|
return ErrInvalidLengthExecution
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.ID = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipExecution(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if skippy < 0 {
|
||||||
|
return ErrInvalidLengthExecution
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (m *Ps) Unmarshal(dAtA []byte) error {
|
||||||
|
l := len(dAtA)
|
||||||
|
iNdEx := 0
|
||||||
|
for iNdEx < l {
|
||||||
|
preIndex := iNdEx
|
||||||
|
var wire uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowExecution
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
wire |= (uint64(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fieldNum := int32(wire >> 3)
|
||||||
|
wireType := int(wire & 0x7)
|
||||||
|
if wireType == 4 {
|
||||||
|
return fmt.Errorf("proto: Ps: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: Ps: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 0 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType)
|
||||||
|
}
|
||||||
|
m.Pid = 0
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowExecution
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
m.Pid |= (uint32(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 2:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field RuntimeData", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowExecution
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= (int(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthExecution
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
if m.RuntimeData == nil {
|
||||||
|
m.RuntimeData = &google_protobuf1.Any{}
|
||||||
|
}
|
||||||
|
if err := m.RuntimeData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipExecution(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if skippy < 0 {
|
||||||
|
return ErrInvalidLengthExecution
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (m *PsResponse) Unmarshal(dAtA []byte) error {
|
||||||
|
l := len(dAtA)
|
||||||
|
iNdEx := 0
|
||||||
|
for iNdEx < l {
|
||||||
|
preIndex := iNdEx
|
||||||
|
var wire uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowExecution
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
wire |= (uint64(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fieldNum := int32(wire >> 3)
|
||||||
|
wireType := int(wire & 0x7)
|
||||||
|
if wireType == 4 {
|
||||||
|
return fmt.Errorf("proto: PsResponse: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: PsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Ps", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowExecution
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= (int(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthExecution
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.Ps = append(m.Ps, &Ps{})
|
||||||
|
if err := m.Ps[len(m.Ps)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipExecution(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if skippy < 0 {
|
||||||
|
return ErrInvalidLengthExecution
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func skipExecution(dAtA []byte) (n int, err error) {
|
func skipExecution(dAtA []byte) (n int, err error) {
|
||||||
l := len(dAtA)
|
l := len(dAtA)
|
||||||
iNdEx := 0
|
iNdEx := 0
|
||||||
@ -3502,59 +4158,64 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var fileDescriptorExecution = []byte{
|
var fileDescriptorExecution = []byte{
|
||||||
// 854 bytes of a gzipped FileDescriptorProto
|
// 944 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4f, 0x8f, 0xdb, 0x44,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xcd, 0x8e, 0xe3, 0x44,
|
||||||
0x14, 0x5f, 0xe7, 0x8f, 0x37, 0x7d, 0xd9, 0x94, 0x32, 0x5a, 0xad, 0x8c, 0x91, 0x92, 0xc8, 0xb4,
|
0x10, 0x1e, 0x3b, 0x89, 0x37, 0x5b, 0x49, 0x96, 0xa5, 0x35, 0x1a, 0x19, 0x23, 0x25, 0xc1, 0xfb,
|
||||||
0x25, 0x5c, 0x1c, 0x58, 0x6e, 0x08, 0x90, 0xb2, 0xd9, 0xa8, 0xaa, 0x4a, 0xe9, 0xe2, 0x20, 0x71,
|
0x43, 0xe0, 0xe0, 0xc0, 0x70, 0x00, 0x21, 0x40, 0x9a, 0x9f, 0x68, 0x59, 0x0d, 0xcb, 0x06, 0x0f,
|
||||||
0xac, 0xbc, 0xf1, 0x6c, 0x32, 0x92, 0xe3, 0x31, 0x9e,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xb5, 0xdc, 0x5d, 0xe9,
|
||||||
0xdb, 0xdc, 0x03, 0x0a, 0x00, 0x00,
|
0x8a, 0xb6, 0xc9, 0x97, 0x00, 0x6b, 0x5d, 0x40, 0x1f, 0x69, 0xf9, 0xb9, 0xad, 0x1d, 0xda, 0x82,
|
||||||
|
0x23, 0x68, 0x08, 0xa5, 0xd0, 0x53, 0xb7, 0x2c, 0x24, 0xda, 0x32, 0xcf, 0xc0, 0x92, 0x42, 0xa2,
|
||||||
|
0x1f, 0xfe, 0x86, 0xd0, 0x68, 0x0b, 0x9d, 0x08, 0x0d, 0xf9, 0xe0, 0x8e, 0xf5, 0x56, 0x05, 0xdc,
|
||||||
|
0xbb, 0x42, 0xe4, 0xc0, 0x0f, 0xed, 0xeb, 0xd7, 0xdd, 0x9d, 0x7f, 0x5e, 0x77, 0x77, 0x7e, 0x5d,
|
||||||
|
0x76, 0x8d, 0xeb, 0x65, 0xd7, 0xf8, 0x7b, 0xd9, 0x35, 0xfe, 0x5b, 0x76, 0x8d, 0x33, 0x4b, 0x5c,
|
||||||
|
0xfb, 0xd9, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9b, 0x87, 0x9e, 0x96, 0x24, 0x0b, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
@ -22,11 +22,12 @@ service ContainerService {
|
|||||||
rpc CloseStdin(CloseStdinRequest) returns (google.protobuf.Empty);
|
rpc CloseStdin(CloseStdinRequest) returns (google.protobuf.Empty);
|
||||||
rpc Pause(PauseRequest) returns (google.protobuf.Empty);
|
rpc Pause(PauseRequest) returns (google.protobuf.Empty);
|
||||||
rpc Resume(ResumeRequest) returns (google.protobuf.Empty);
|
rpc Resume(ResumeRequest) returns (google.protobuf.Empty);
|
||||||
|
rpc Ps(PsRequest) returns (PsResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
message CreateRequest {
|
message CreateRequest {
|
||||||
string id = 1 [(gogoproto.customname) = "ID"];
|
string id = 1 [(gogoproto.customname) = "ID"];
|
||||||
google.protobuf.Any spec = 2;
|
google.protobuf.Any spec = 2;
|
||||||
repeated containerd.v1.types.Mount rootfs = 3;
|
repeated containerd.v1.types.Mount rootfs = 3;
|
||||||
string runtime = 4;
|
string runtime = 4;
|
||||||
string stdin = 5;
|
string stdin = 5;
|
||||||
@ -68,7 +69,10 @@ message ListResponse {
|
|||||||
message KillRequest {
|
message KillRequest {
|
||||||
string id = 1 [(gogoproto.customname) = "ID"];
|
string id = 1 [(gogoproto.customname) = "ID"];
|
||||||
uint32 signal = 2;
|
uint32 signal = 2;
|
||||||
bool all = 3;
|
oneof pid_or_all {
|
||||||
|
bool all = 3;
|
||||||
|
uint32 pid = 4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
message EventsRequest {
|
message EventsRequest {
|
||||||
@ -106,3 +110,16 @@ message PauseRequest {
|
|||||||
message ResumeRequest {
|
message ResumeRequest {
|
||||||
string id = 1 [(gogoproto.customname) = "ID"];
|
string id = 1 [(gogoproto.customname) = "ID"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message PsRequest {
|
||||||
|
string id = 1 [(gogoproto.customname) = "ID"];
|
||||||
|
}
|
||||||
|
|
||||||
|
message Ps {
|
||||||
|
uint32 pid = 1;
|
||||||
|
google.protobuf.Any runtime_data = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PsResponse{
|
||||||
|
repeated Ps ps = 1;
|
||||||
|
}
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
ExitRequest
|
ExitRequest
|
||||||
KillRequest
|
KillRequest
|
||||||
CloseStdinRequest
|
CloseStdinRequest
|
||||||
|
PsRequest
|
||||||
|
Ps
|
||||||
|
PsResponse
|
||||||
*/
|
*/
|
||||||
package shim
|
package shim
|
||||||
|
|
||||||
@ -218,6 +221,31 @@ func (m *CloseStdinRequest) Reset() { *m = CloseStdinRequest{
|
|||||||
func (*CloseStdinRequest) ProtoMessage() {}
|
func (*CloseStdinRequest) ProtoMessage() {}
|
||||||
func (*CloseStdinRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{16} }
|
func (*CloseStdinRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{16} }
|
||||||
|
|
||||||
|
type PsRequest struct {
|
||||||
|
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *PsRequest) Reset() { *m = PsRequest{} }
|
||||||
|
func (*PsRequest) ProtoMessage() {}
|
||||||
|
func (*PsRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{17} }
|
||||||
|
|
||||||
|
type Ps struct {
|
||||||
|
Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"`
|
||||||
|
RuntimeData *google_protobuf.Any `protobuf:"bytes,2,opt,name=runtime_data,json=runtimeData" json:"runtime_data,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Ps) Reset() { *m = Ps{} }
|
||||||
|
func (*Ps) ProtoMessage() {}
|
||||||
|
func (*Ps) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{18} }
|
||||||
|
|
||||||
|
type PsResponse struct {
|
||||||
|
Ps []*Ps `protobuf:"bytes,1,rep,name=ps" json:"ps,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *PsResponse) Reset() { *m = PsResponse{} }
|
||||||
|
func (*PsResponse) ProtoMessage() {}
|
||||||
|
func (*PsResponse) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{19} }
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
proto.RegisterType((*CreateRequest)(nil), "containerd.v1.services.shim.CreateRequest")
|
proto.RegisterType((*CreateRequest)(nil), "containerd.v1.services.shim.CreateRequest")
|
||||||
proto.RegisterType((*CreateResponse)(nil), "containerd.v1.services.shim.CreateResponse")
|
proto.RegisterType((*CreateResponse)(nil), "containerd.v1.services.shim.CreateResponse")
|
||||||
@ -236,6 +264,9 @@ func init() {
|
|||||||
proto.RegisterType((*ExitRequest)(nil), "containerd.v1.services.shim.ExitRequest")
|
proto.RegisterType((*ExitRequest)(nil), "containerd.v1.services.shim.ExitRequest")
|
||||||
proto.RegisterType((*KillRequest)(nil), "containerd.v1.services.shim.KillRequest")
|
proto.RegisterType((*KillRequest)(nil), "containerd.v1.services.shim.KillRequest")
|
||||||
proto.RegisterType((*CloseStdinRequest)(nil), "containerd.v1.services.shim.CloseStdinRequest")
|
proto.RegisterType((*CloseStdinRequest)(nil), "containerd.v1.services.shim.CloseStdinRequest")
|
||||||
|
proto.RegisterType((*PsRequest)(nil), "containerd.v1.services.shim.PsRequest")
|
||||||
|
proto.RegisterType((*Ps)(nil), "containerd.v1.services.shim.Ps")
|
||||||
|
proto.RegisterType((*PsResponse)(nil), "containerd.v1.services.shim.PsResponse")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
@ -253,6 +284,7 @@ type ShimClient interface {
|
|||||||
Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
|
Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
|
||||||
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
|
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
|
||||||
State(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*StateResponse, error)
|
State(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*StateResponse, error)
|
||||||
|
Ps(ctx context.Context, in *PsRequest, opts ...grpc.CallOption) (*PsResponse, error)
|
||||||
Pause(ctx context.Context, in *PauseRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
|
Pause(ctx context.Context, in *PauseRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
|
||||||
Resume(ctx context.Context, in *ResumeRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
|
Resume(ctx context.Context, in *ResumeRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
|
||||||
Exit(ctx context.Context, in *ExitRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
|
Exit(ctx context.Context, in *ExitRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
|
||||||
@ -307,6 +339,15 @@ func (c *shimClient) State(ctx context.Context, in *StateRequest, opts ...grpc.C
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *shimClient) Ps(ctx context.Context, in *PsRequest, opts ...grpc.CallOption) (*PsResponse, error) {
|
||||||
|
out := new(PsResponse)
|
||||||
|
err := grpc.Invoke(ctx, "/containerd.v1.services.shim.Shim/Ps", in, out, c.cc, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (c *shimClient) Pause(ctx context.Context, in *PauseRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) {
|
func (c *shimClient) Pause(ctx context.Context, in *PauseRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) {
|
||||||
out := new(google_protobuf1.Empty)
|
out := new(google_protobuf1.Empty)
|
||||||
err := grpc.Invoke(ctx, "/containerd.v1.services.shim.Shim/Pause", in, out, c.cc, opts...)
|
err := grpc.Invoke(ctx, "/containerd.v1.services.shim.Shim/Pause", in, out, c.cc, opts...)
|
||||||
@ -409,6 +450,7 @@ type ShimServer interface {
|
|||||||
Start(context.Context, *StartRequest) (*google_protobuf1.Empty, error)
|
Start(context.Context, *StartRequest) (*google_protobuf1.Empty, error)
|
||||||
Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
|
Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
|
||||||
State(context.Context, *StateRequest) (*StateResponse, error)
|
State(context.Context, *StateRequest) (*StateResponse, error)
|
||||||
|
Ps(context.Context, *PsRequest) (*PsResponse, error)
|
||||||
Pause(context.Context, *PauseRequest) (*google_protobuf1.Empty, error)
|
Pause(context.Context, *PauseRequest) (*google_protobuf1.Empty, error)
|
||||||
Resume(context.Context, *ResumeRequest) (*google_protobuf1.Empty, error)
|
Resume(context.Context, *ResumeRequest) (*google_protobuf1.Empty, error)
|
||||||
Exit(context.Context, *ExitRequest) (*google_protobuf1.Empty, error)
|
Exit(context.Context, *ExitRequest) (*google_protobuf1.Empty, error)
|
||||||
@ -495,6 +537,24 @@ func _Shim_State_Handler(srv interface{}, ctx context.Context, dec func(interfac
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Shim_Ps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(PsRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ShimServer).Ps(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/containerd.v1.services.shim.Shim/Ps",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ShimServer).Ps(ctx, req.(*PsRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
func _Shim_Pause_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _Shim_Pause_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(PauseRequest)
|
in := new(PauseRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -662,6 +722,10 @@ var _Shim_serviceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "State",
|
MethodName: "State",
|
||||||
Handler: _Shim_State_Handler,
|
Handler: _Shim_State_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Ps",
|
||||||
|
Handler: _Shim_Ps_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "Pause",
|
MethodName: "Pause",
|
||||||
Handler: _Shim_Pause_Handler,
|
Handler: _Shim_Pause_Handler,
|
||||||
@ -1231,6 +1295,93 @@ func (m *CloseStdinRequest) MarshalTo(dAtA []byte) (int, error) {
|
|||||||
return i, nil
|
return i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *PsRequest) Marshal() (dAtA []byte, err error) {
|
||||||
|
size := m.Size()
|
||||||
|
dAtA = make([]byte, size)
|
||||||
|
n, err := m.MarshalTo(dAtA)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return dAtA[:n], nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *PsRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
var i int
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.ID) > 0 {
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
i++
|
||||||
|
i = encodeVarintShim(dAtA, i, uint64(len(m.ID)))
|
||||||
|
i += copy(dAtA[i:], m.ID)
|
||||||
|
}
|
||||||
|
return i, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Ps) Marshal() (dAtA []byte, err error) {
|
||||||
|
size := m.Size()
|
||||||
|
dAtA = make([]byte, size)
|
||||||
|
n, err := m.MarshalTo(dAtA)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return dAtA[:n], nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Ps) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
var i int
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.Pid != 0 {
|
||||||
|
dAtA[i] = 0x8
|
||||||
|
i++
|
||||||
|
i = encodeVarintShim(dAtA, i, uint64(m.Pid))
|
||||||
|
}
|
||||||
|
if m.RuntimeData != nil {
|
||||||
|
dAtA[i] = 0x12
|
||||||
|
i++
|
||||||
|
i = encodeVarintShim(dAtA, i, uint64(m.RuntimeData.Size()))
|
||||||
|
n3, err := m.RuntimeData.MarshalTo(dAtA[i:])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i += n3
|
||||||
|
}
|
||||||
|
return i, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *PsResponse) Marshal() (dAtA []byte, err error) {
|
||||||
|
size := m.Size()
|
||||||
|
dAtA = make([]byte, size)
|
||||||
|
n, err := m.MarshalTo(dAtA)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return dAtA[:n], nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *PsResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
var i int
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.Ps) > 0 {
|
||||||
|
for _, msg := range m.Ps {
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
i++
|
||||||
|
i = encodeVarintShim(dAtA, i, uint64(msg.Size()))
|
||||||
|
n, err := msg.MarshalTo(dAtA[i:])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i += n
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return i, nil
|
||||||
|
}
|
||||||
|
|
||||||
func encodeFixed64Shim(dAtA []byte, offset int, v uint64) int {
|
func encodeFixed64Shim(dAtA []byte, offset int, v uint64) int {
|
||||||
dAtA[offset] = uint8(v)
|
dAtA[offset] = uint8(v)
|
||||||
dAtA[offset+1] = uint8(v >> 8)
|
dAtA[offset+1] = uint8(v >> 8)
|
||||||
@ -1480,6 +1631,41 @@ func (m *CloseStdinRequest) Size() (n int) {
|
|||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *PsRequest) Size() (n int) {
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
l = len(m.ID)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovShim(uint64(l))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Ps) Size() (n int) {
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.Pid != 0 {
|
||||||
|
n += 1 + sovShim(uint64(m.Pid))
|
||||||
|
}
|
||||||
|
if m.RuntimeData != nil {
|
||||||
|
l = m.RuntimeData.Size()
|
||||||
|
n += 1 + l + sovShim(uint64(l))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *PsResponse) Size() (n int) {
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.Ps) > 0 {
|
||||||
|
for _, e := range m.Ps {
|
||||||
|
l = e.Size()
|
||||||
|
n += 1 + l + sovShim(uint64(l))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
func sovShim(x uint64) (n int) {
|
func sovShim(x uint64) (n int) {
|
||||||
for {
|
for {
|
||||||
n++
|
n++
|
||||||
@ -1680,6 +1866,37 @@ func (this *CloseStdinRequest) String() string {
|
|||||||
}, "")
|
}, "")
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
func (this *PsRequest) String() string {
|
||||||
|
if this == nil {
|
||||||
|
return "nil"
|
||||||
|
}
|
||||||
|
s := strings.Join([]string{`&PsRequest{`,
|
||||||
|
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
|
||||||
|
`}`,
|
||||||
|
}, "")
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
func (this *Ps) String() string {
|
||||||
|
if this == nil {
|
||||||
|
return "nil"
|
||||||
|
}
|
||||||
|
s := strings.Join([]string{`&Ps{`,
|
||||||
|
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
|
||||||
|
`RuntimeData:` + strings.Replace(fmt.Sprintf("%v", this.RuntimeData), "Any", "google_protobuf.Any", 1) + `,`,
|
||||||
|
`}`,
|
||||||
|
}, "")
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
func (this *PsResponse) String() string {
|
||||||
|
if this == nil {
|
||||||
|
return "nil"
|
||||||
|
}
|
||||||
|
s := strings.Join([]string{`&PsResponse{`,
|
||||||
|
`Ps:` + strings.Replace(fmt.Sprintf("%v", this.Ps), "Ps", "Ps", 1) + `,`,
|
||||||
|
`}`,
|
||||||
|
}, "")
|
||||||
|
return s
|
||||||
|
}
|
||||||
func valueToStringShim(v interface{}) string {
|
func valueToStringShim(v interface{}) string {
|
||||||
rv := reflect.ValueOf(v)
|
rv := reflect.ValueOf(v)
|
||||||
if rv.IsNil() {
|
if rv.IsNil() {
|
||||||
@ -3357,6 +3574,268 @@ func (m *CloseStdinRequest) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (m *PsRequest) Unmarshal(dAtA []byte) error {
|
||||||
|
l := len(dAtA)
|
||||||
|
iNdEx := 0
|
||||||
|
for iNdEx < l {
|
||||||
|
preIndex := iNdEx
|
||||||
|
var wire uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowShim
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
wire |= (uint64(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fieldNum := int32(wire >> 3)
|
||||||
|
wireType := int(wire & 0x7)
|
||||||
|
if wireType == 4 {
|
||||||
|
return fmt.Errorf("proto: PsRequest: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: PsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowShim
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
stringLen |= (uint64(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
intStringLen := int(stringLen)
|
||||||
|
if intStringLen < 0 {
|
||||||
|
return ErrInvalidLengthShim
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.ID = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipShim(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if skippy < 0 {
|
||||||
|
return ErrInvalidLengthShim
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (m *Ps) Unmarshal(dAtA []byte) error {
|
||||||
|
l := len(dAtA)
|
||||||
|
iNdEx := 0
|
||||||
|
for iNdEx < l {
|
||||||
|
preIndex := iNdEx
|
||||||
|
var wire uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowShim
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
wire |= (uint64(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fieldNum := int32(wire >> 3)
|
||||||
|
wireType := int(wire & 0x7)
|
||||||
|
if wireType == 4 {
|
||||||
|
return fmt.Errorf("proto: Ps: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: Ps: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 0 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType)
|
||||||
|
}
|
||||||
|
m.Pid = 0
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowShim
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
m.Pid |= (uint32(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 2:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field RuntimeData", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowShim
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= (int(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthShim
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
if m.RuntimeData == nil {
|
||||||
|
m.RuntimeData = &google_protobuf.Any{}
|
||||||
|
}
|
||||||
|
if err := m.RuntimeData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipShim(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if skippy < 0 {
|
||||||
|
return ErrInvalidLengthShim
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (m *PsResponse) Unmarshal(dAtA []byte) error {
|
||||||
|
l := len(dAtA)
|
||||||
|
iNdEx := 0
|
||||||
|
for iNdEx < l {
|
||||||
|
preIndex := iNdEx
|
||||||
|
var wire uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowShim
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
wire |= (uint64(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fieldNum := int32(wire >> 3)
|
||||||
|
wireType := int(wire & 0x7)
|
||||||
|
if wireType == 4 {
|
||||||
|
return fmt.Errorf("proto: PsResponse: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: PsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Ps", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowShim
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= (int(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthShim
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.Ps = append(m.Ps, &Ps{})
|
||||||
|
if err := m.Ps[len(m.Ps)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipShim(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if skippy < 0 {
|
||||||
|
return ErrInvalidLengthShim
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func skipShim(dAtA []byte) (n int, err error) {
|
func skipShim(dAtA []byte) (n int, err error) {
|
||||||
l := len(dAtA)
|
l := len(dAtA)
|
||||||
iNdEx := 0
|
iNdEx := 0
|
||||||
@ -3467,63 +3946,67 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var fileDescriptorShim = []byte{
|
var fileDescriptorShim = []byte{
|
||||||
// 913 bytes of a gzipped FileDescriptorProto
|
// 983 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4f, 0x6f, 0xe3, 0x44,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xcd, 0x6f, 0xe3, 0x44,
|
||||||
0x14, 0xaf, 0x93, 0xd4, 0x4d, 0x5f, 0xd6, 0x5d, 0x18, 0x55, 0x95, 0x37, 0x45, 0x49, 0xb1, 0x84,
|
0x14, 0xaf, 0x93, 0xd4, 0x4d, 0x5f, 0xea, 0x2e, 0x8c, 0xaa, 0xca, 0x9b, 0xa2, 0xa4, 0x18, 0x01,
|
||||||
0xc8, 0x2e, 0x92, 0x03, 0xd9, 0x1b, 0x82, 0x43, 0xbb, 0x2d, 0x62, 0x61, 0x91, 0xa2, 0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|
||||||
0x29, 0x99, 0xa8, 0x82, 0x76, 0x46, 0xfb, 0x77, 0xf0, 0x1e, 0x27, 0x73, 0xac, 0x3c, 0xbc, 0x53,
|
0x11, 0x34, 0x78, 0x4a, 0x86, 0x2a, 0xa1, 0xad, 0xe3, 0xbd, 0x3b, 0x7c, 0x4f, 0x92, 0x09, 0x56,
|
||||||
0xb0, 0x71, 0x44, 0x63, 0x2a, 0x10, 0x82, 0x96, 0xac, 0x84, 0xee, 0x37, 0xac, 0x64, 0x69, 0x9b,
|
0x08, 0xaf, 0x0f, 0x36, 0x8e, 0x68, 0x4c, 0x05, 0x42, 0xd0, 0x90, 0x99, 0xd0, 0xf5, 0x86, 0xd5,
|
||||||
0x05, 0x59, 0xa8, 0xc0, 0xb4, 0xb0, 0x92, 0xa5, 0x8d, 0xb3, 0x2b, 0x8d, 0xa4, 0x85, 0x95, 0xec,
|
0x5a, 0xda, 0xc6, 0x41, 0x16, 0x2a, 0x32, 0x0d, 0xac, 0xd6, 0xd2, 0xc6, 0xd9, 0x95, 0x66, 0xd2,
|
||||||
0x1d, 0xc1, 0x23, 0x9d, 0x60, 0x6d, 0xb1, 0x5e, 0x01, 0x8c, 0xc5, 0xbc, 0xb6, 0x32, 0x32, 0xef,
|
0xc0, 0x6a, 0xed, 0x1d, 0xc2, 0x8e, 0x0e, 0xb0, 0x34, 0x59, 0x2f, 0x00, 0x06, 0x62, 0x52, 0x9a,
|
||||||
0x5f, 0x68, 0x28, 0x66, 0xea, 0x29, 0x07, 0x6b, 0x45, 0xe6, 0x37, 0x23, 0x74, 0x3a, 0xd3, 0xaf,
|
0x19, 0x19, 0xf7, 0x2f, 0x34, 0x14, 0x63, 0x75, 0x95, 0x83, 0xf5, 0x46, 0xc6, 0x37, 0x26, 0x74,
|
||||||
0x39, 0xd8, 0x68, 0xde, 0x63, 0x70, 0xce, 0xae, 0x49, 0x22, 0x78, 0x51, 0x7b, 0xdd, 0x0b, 0x65,
|
0x34, 0xd6, 0xb7, 0x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|
0x80, 0xf9, 0x50, 0x43, 0xfe, 0xfa, 0x3e, 0xbe, 0x3d, 0xfd, 0xca, 0xbc, 0x9e, 0xba, 0x37, 0x6f,
|
||||||
|
0x3a, 0x1b, 0xff, 0xbc, 0xe9, 0x6c, 0xfc, 0x3a, 0xed, 0x58, 0x37, 0xd3, 0x8e, 0xf5, 0xf7, 0xb4,
|
||||||
|
0x63, 0xfd, 0x37, 0xed, 0x58, 0x97, 0xb6, 0x42, 0x3e, 0xf9, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x7a,
|
||||||
|
0x10, 0xcb, 0x24, 0x29, 0x0b, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ service Shim {
|
|||||||
rpc Start(StartRequest) returns (google.protobuf.Empty);
|
rpc Start(StartRequest) returns (google.protobuf.Empty);
|
||||||
rpc Delete(DeleteRequest) returns (DeleteResponse);
|
rpc Delete(DeleteRequest) returns (DeleteResponse);
|
||||||
rpc State(StateRequest) returns (StateResponse);
|
rpc State(StateRequest) returns (StateResponse);
|
||||||
|
rpc Ps(PsRequest) returns (PsResponse);
|
||||||
rpc Pause(PauseRequest) returns (google.protobuf.Empty);
|
rpc Pause(PauseRequest) returns (google.protobuf.Empty);
|
||||||
rpc Resume(ResumeRequest) returns (google.protobuf.Empty);
|
rpc Resume(ResumeRequest) returns (google.protobuf.Empty);
|
||||||
|
|
||||||
@ -113,3 +114,16 @@ message KillRequest {
|
|||||||
message CloseStdinRequest {
|
message CloseStdinRequest {
|
||||||
uint32 pid = 1;
|
uint32 pid = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message PsRequest {
|
||||||
|
string id = 1 [(gogoproto.customname) = "ID"];
|
||||||
|
}
|
||||||
|
|
||||||
|
message Ps {
|
||||||
|
uint32 pid = 1;
|
||||||
|
google.protobuf.Any runtime_data = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PsResponse{
|
||||||
|
repeated Ps ps = 1;
|
||||||
|
}
|
||||||
|
@ -16,6 +16,11 @@ var killCommand = cli.Command{
|
|||||||
Name: "id",
|
Name: "id",
|
||||||
Usage: "id of the container",
|
Usage: "id of the container",
|
||||||
},
|
},
|
||||||
|
cli.IntFlag{
|
||||||
|
Name: "pid",
|
||||||
|
Usage: "pid to kill",
|
||||||
|
Value: 0,
|
||||||
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "all, a",
|
Name: "all, a",
|
||||||
Usage: "send signal to all processes inside the container",
|
Usage: "send signal to all processes inside the container",
|
||||||
@ -37,14 +42,29 @@ var killCommand = cli.Command{
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
containers, err := getExecutionService(context)
|
pid := context.Int("pid")
|
||||||
if err != nil {
|
all := context.Bool("all")
|
||||||
return err
|
if pid > 0 && all {
|
||||||
|
return errors.New("enter a pid or all; not both")
|
||||||
}
|
}
|
||||||
|
|
||||||
killRequest := &execution.KillRequest{
|
killRequest := &execution.KillRequest{
|
||||||
ID: id,
|
ID: id,
|
||||||
Signal: uint32(signal),
|
Signal: uint32(signal),
|
||||||
All: context.Bool("all"),
|
PidOrAll: &execution.KillRequest_Pid{
|
||||||
|
Pid: uint32(pid),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
if all {
|
||||||
|
killRequest.PidOrAll = &execution.KillRequest_All{
|
||||||
|
All: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
containers, err := getExecutionService(context)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
_, err = containers.Kill(gocontext.Background(), killRequest)
|
_, err = containers.Kill(gocontext.Background(), killRequest)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -63,6 +63,7 @@ containerd client
|
|||||||
resumeCommand,
|
resumeCommand,
|
||||||
snapshotCommand,
|
snapshotCommand,
|
||||||
versionCommand,
|
versionCommand,
|
||||||
|
psCommand,
|
||||||
}
|
}
|
||||||
app.Commands = append(app.Commands, extraCmds...)
|
app.Commands = append(app.Commands, extraCmds...)
|
||||||
app.Before = func(context *cli.Context) error {
|
app.Before = func(context *cli.Context) error {
|
||||||
|
58
cmd/ctr/ps.go
Normal file
58
cmd/ctr/ps.go
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
gocontext "context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
"text/tabwriter"
|
||||||
|
|
||||||
|
"github.com/containerd/containerd/api/services/execution"
|
||||||
|
"github.com/pkg/errors"
|
||||||
|
"github.com/urfave/cli"
|
||||||
|
)
|
||||||
|
|
||||||
|
var psCommand = cli.Command{
|
||||||
|
Name: "ps",
|
||||||
|
Usage: "list processes for container",
|
||||||
|
Flags: []cli.Flag{
|
||||||
|
cli.StringFlag{
|
||||||
|
Name: "id",
|
||||||
|
Usage: "id of the container",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Action: func(context *cli.Context) error {
|
||||||
|
id := context.String("id")
|
||||||
|
if id == "" {
|
||||||
|
return errors.New("container id must be provided")
|
||||||
|
}
|
||||||
|
|
||||||
|
psRequest := &execution.PsRequest{
|
||||||
|
ID: id,
|
||||||
|
}
|
||||||
|
|
||||||
|
containers, err := getExecutionService(context)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
resp, err := containers.Ps(gocontext.Background(), psRequest)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
w := tabwriter.NewWriter(os.Stdout, 10, 1, 3, ' ', 0)
|
||||||
|
fmt.Fprintln(w, "PID")
|
||||||
|
for _, ps := range resp.Ps {
|
||||||
|
if _, err := fmt.Fprintf(w, "%d\n",
|
||||||
|
ps.Pid,
|
||||||
|
); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := w.Flush(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
},
|
||||||
|
}
|
@ -117,7 +117,9 @@ func forwardAllSignals(containers execution.ContainerServiceClient, id string) c
|
|||||||
killRequest := &execution.KillRequest{
|
killRequest := &execution.KillRequest{
|
||||||
ID: id,
|
ID: id,
|
||||||
Signal: uint32(s.(syscall.Signal)),
|
Signal: uint32(s.(syscall.Signal)),
|
||||||
All: false,
|
PidOrAll: &execution.KillRequest_All{
|
||||||
|
All: false,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
_, err := containers.Kill(gocontext.Background(), killRequest)
|
_, err := containers.Kill(gocontext.Background(), killRequest)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -83,9 +83,10 @@ func (c *Container) Resume(ctx context.Context) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Container) Kill(ctx context.Context, signal uint32, all bool) error {
|
func (c *Container) Kill(ctx context.Context, signal uint32, pid uint32, all bool) error {
|
||||||
_, err := c.shim.Kill(ctx, &shim.KillRequest{
|
_, err := c.shim.Kill(ctx, &shim.KillRequest{
|
||||||
Signal: signal,
|
Signal: signal,
|
||||||
|
Pid: pid,
|
||||||
All: all,
|
All: all,
|
||||||
})
|
})
|
||||||
return err
|
return err
|
||||||
@ -105,12 +106,32 @@ func (c *Container) Exec(ctx context.Context, opts plugin.ExecOpts) (plugin.Proc
|
|||||||
resp, err := c.shim.Exec(ctx, request)
|
resp, err := c.shim.Exec(ctx, request)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
||||||
}
|
}
|
||||||
return &Process{
|
return &Process{
|
||||||
pid: int(resp.Pid),
|
pid: int(resp.Pid),
|
||||||
c: c,
|
c: c,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *Container) Ps(ctx context.Context) ([]uint32, error) {
|
||||||
|
resp, err := c.shim.Ps(ctx, &shim.PsRequest{
|
||||||
|
ID: c.id,
|
||||||
|
})
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
pids := make([]uint32, 0, len(resp.Ps))
|
||||||
|
|
||||||
|
for _, ps := range resp.Ps {
|
||||||
|
pids = append(pids, ps.Pid)
|
||||||
|
}
|
||||||
|
|
||||||
|
return pids, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (c *Container) Pty(ctx context.Context, pid uint32, size plugin.ConsoleSize) error {
|
func (c *Container) Pty(ctx context.Context, pid uint32, size plugin.ConsoleSize) error {
|
||||||
_, err := c.shim.Pty(ctx, &shim.PtyRequest{
|
_, err := c.shim.Pty(ctx, &shim.PtyRequest{
|
||||||
Pid: pid,
|
Pid: pid,
|
||||||
|
@ -82,6 +82,10 @@ func (c *client) Kill(ctx context.Context, in *shimapi.KillRequest, opts ...grpc
|
|||||||
return c.s.Kill(ctx, in)
|
return c.s.Kill(ctx, in)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *client) Ps(ctx context.Context, in *shimapi.PsRequest, opts ...grpc.CallOption) (*shimapi.PsResponse, error) {
|
||||||
|
return c.s.Ps(ctx, in)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *client) Exit(ctx context.Context, in *shimapi.ExitRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) {
|
func (c *client) Exit(ctx context.Context, in *shimapi.ExitRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) {
|
||||||
// don't exit the calling process for the client
|
// don't exit the calling process for the client
|
||||||
// but make sure we unmount the containers rootfs for this client
|
// but make sure we unmount the containers rootfs for this client
|
||||||
|
@ -225,16 +225,51 @@ func (s *Service) Kill(ctx context.Context, r *shimapi.KillRequest) (*google_pro
|
|||||||
}
|
}
|
||||||
return empty, nil
|
return empty, nil
|
||||||
}
|
}
|
||||||
proc, ok := s.processes[int(r.Pid)]
|
|
||||||
if !ok {
|
pids, err := s.getContainerPids(ctx, s.initProcess.id)
|
||||||
return nil, fmt.Errorf("process does not exist %d", r.Pid)
|
if err != nil {
|
||||||
}
|
|
||||||
if err := proc.Signal(int(r.Signal)); err != nil {
|
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
valid := false
|
||||||
|
for _, p := range pids {
|
||||||
|
if r.Pid == p {
|
||||||
|
valid = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if !valid {
|
||||||
|
return nil, errors.Errorf("process %d does not exist in container", r.Pid)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := unix.Kill(int(r.Pid), syscall.Signal(r.Signal)); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
return empty, nil
|
return empty, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Service) Ps(ctx context.Context, r *shimapi.PsRequest) (*shimapi.PsResponse, error) {
|
||||||
|
pids, err := s.getContainerPids(ctx, r.ID)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
ps := []*shimapi.Ps{}
|
||||||
|
for _, pid := range pids {
|
||||||
|
ps = append(ps, &shimapi.Ps{
|
||||||
|
Pid: pid,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
resp := &shimapi.PsResponse{
|
||||||
|
Ps: ps,
|
||||||
|
}
|
||||||
|
|
||||||
|
return resp, nil
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
func (s *Service) CloseStdin(ctx context.Context, r *shimapi.CloseStdinRequest) (*google_protobuf.Empty, error) {
|
func (s *Service) CloseStdin(ctx context.Context, r *shimapi.CloseStdinRequest) (*google_protobuf.Empty, error) {
|
||||||
p, ok := s.processes[int(r.Pid)]
|
p, ok := s.processes[int(r.Pid)]
|
||||||
if !ok {
|
if !ok {
|
||||||
@ -257,3 +292,17 @@ func (s *Service) waitExit(p process, pid int, cmd *reaper.Cmd) {
|
|||||||
ExitedAt: p.ExitedAt(),
|
ExitedAt: p.ExitedAt(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Service) getContainerPids(ctx context.Context, id string) ([]uint32, error) {
|
||||||
|
p, err := s.initProcess.runc.Ps(ctx, id)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
pids := make([]uint32, 0, len(p))
|
||||||
|
for _, pid := range p {
|
||||||
|
pids = append(pids, uint32(pid))
|
||||||
|
}
|
||||||
|
|
||||||
|
return pids, nil
|
||||||
|
}
|
||||||
|
@ -19,9 +19,11 @@ type Container interface {
|
|||||||
// Resume unpauses the container process
|
// Resume unpauses the container process
|
||||||
Resume(context.Context) error
|
Resume(context.Context) error
|
||||||
// Kill signals a container
|
// Kill signals a container
|
||||||
Kill(context.Context, uint32, bool) error
|
Kill(context.Context, uint32, uint32, bool) error
|
||||||
// Exec adds a process into the container
|
// Exec adds a process into the container
|
||||||
Exec(context.Context, ExecOpts) (Process, error)
|
Exec(context.Context, ExecOpts) (Process, error)
|
||||||
|
// Ps returns all pids for the container
|
||||||
|
Ps(context.Context) ([]uint32, error)
|
||||||
// Pty resizes the processes pty/console
|
// Pty resizes the processes pty/console
|
||||||
Pty(context.Context, uint32, ConsoleSize) error
|
Pty(context.Context, uint32, ConsoleSize) error
|
||||||
// CloseStdin closes the processes stdin
|
// CloseStdin closes the processes stdin
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package execution
|
package execution
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/containerd/containerd"
|
"github.com/containerd/containerd"
|
||||||
@ -217,12 +218,47 @@ func (s *Service) Kill(ctx context.Context, r *api.KillRequest) (*google_protobu
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if err := c.Kill(ctx, r.Signal, r.All); err != nil {
|
|
||||||
return nil, err
|
switch v := r.PidOrAll.(type) {
|
||||||
|
case *api.KillRequest_All:
|
||||||
|
if err := c.Kill(ctx, r.Signal, 0, true); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
case *api.KillRequest_Pid:
|
||||||
|
if err := c.Kill(ctx, r.Signal, v.Pid, false); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("invalid option specified; expected pid or all")
|
||||||
}
|
}
|
||||||
return empty, nil
|
return empty, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Service) Ps(ctx context.Context, r *api.PsRequest) (*api.PsResponse, error) {
|
||||||
|
c, err := s.getContainer(r.ID)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
pids, err := c.Ps(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
ps := []*api.Ps{}
|
||||||
|
for _, pid := range pids {
|
||||||
|
ps = append(ps, &api.Ps{
|
||||||
|
Pid: pid,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
resp := &api.PsResponse{
|
||||||
|
Ps: ps,
|
||||||
|
}
|
||||||
|
|
||||||
|
return resp, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (s *Service) Events(r *api.EventsRequest, server api.ContainerService_EventsServer) error {
|
func (s *Service) Events(r *api.EventsRequest, server api.ContainerService_EventsServer) error {
|
||||||
w := &grpcEventWriter{
|
w := &grpcEventWriter{
|
||||||
server: server,
|
server: server,
|
||||||
|
@ -120,7 +120,7 @@ func (c *container) State(ctx context.Context) (plugin.State, error) {
|
|||||||
return c, nil
|
return c, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *container) Kill(ctx context.Context, signal uint32, all bool) error {
|
func (c *container) Kill(ctx context.Context, signal uint32, pid uint32, all bool) error {
|
||||||
if winsys.Signal(signal) == winsys.SIGKILL {
|
if winsys.Signal(signal) == winsys.SIGKILL {
|
||||||
return c.ctr.Kill(ctx)
|
return c.ctr.Kill(ctx)
|
||||||
}
|
}
|
||||||
@ -174,6 +174,16 @@ func (c *container) Pid() uint32 {
|
|||||||
return c.ctr.Pid()
|
return c.ctr.Pid()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *container) Ps(ctx context.Context) ([]uint32, error) {
|
||||||
|
// TODO (ehazlett): support finding all processes in windows container
|
||||||
|
p, err := c.ctr.ProcessList()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
log.G(ctx).Debug(p)
|
||||||
|
return []uint32{c.ctr.Pid()}, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (c *container) setStatus(status plugin.Status) {
|
func (c *container) setStatus(status plugin.Status) {
|
||||||
c.Lock()
|
c.Lock()
|
||||||
c.status = status
|
c.status = status
|
||||||
|
Loading…
Reference in New Issue
Block a user