api/execution: remove ProcessID from rpc calls

Now that the shim handles all container's processes the system pid is
sufficient.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure 2017-02-02 15:36:10 -08:00
parent 40b0b211b7
commit 6f9eda1134
9 changed files with 151 additions and 241 deletions

View file

@ -178,14 +178,13 @@ func (*Container) ProtoMessage() {}
func (*Container) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{8} } func (*Container) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{8} }
type Process struct { type Process struct {
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"`
Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"` Args []string `protobuf:"bytes,2,rep,name=args" json:"args,omitempty"`
Args []string `protobuf:"bytes,3,rep,name=args" json:"args,omitempty"` Env []string `protobuf:"bytes,3,rep,name=env" json:"env,omitempty"`
Env []string `protobuf:"bytes,4,rep,name=env" json:"env,omitempty"` User *User `protobuf:"bytes,4,opt,name=user" json:"user,omitempty"`
User *User `protobuf:"bytes,5,opt,name=user" json:"user,omitempty"` Cwd string `protobuf:"bytes,5,opt,name=cwd,proto3" json:"cwd,omitempty"`
Cwd string `protobuf:"bytes,6,opt,name=cwd,proto3" json:"cwd,omitempty"` Terminal bool `protobuf:"varint,6,opt,name=terminal,proto3" json:"terminal,omitempty"`
Terminal bool `protobuf:"varint,7,opt,name=terminal,proto3" json:"terminal,omitempty"` ExitStatus uint32 `protobuf:"varint,7,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
ExitStatus uint32 `protobuf:"varint,8,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
} }
func (m *Process) Reset() { *m = Process{} } func (m *Process) Reset() { *m = Process{} }
@ -245,7 +244,7 @@ func (*ResumeContainerRequest) Descriptor() ([]byte, []int) { return fileDescrip
type GetProcessRequest struct { type GetProcessRequest struct {
ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
ProcessID string `protobuf:"bytes,2,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`
} }
func (m *GetProcessRequest) Reset() { *m = GetProcessRequest{} } func (m *GetProcessRequest) Reset() { *m = GetProcessRequest{} }
@ -262,7 +261,7 @@ func (*GetProcessResponse) Descriptor() ([]byte, []int) { return fileDescriptorE
type SignalProcessRequest struct { type SignalProcessRequest struct {
ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
ProcessID string `protobuf:"bytes,2,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`
Signal uint32 `protobuf:"varint,3,opt,name=signal,proto3" json:"signal,omitempty"` Signal uint32 `protobuf:"varint,3,opt,name=signal,proto3" json:"signal,omitempty"`
} }
@ -272,7 +271,7 @@ func (*SignalProcessRequest) Descriptor() ([]byte, []int) { return fileDescripto
type DeleteProcessRequest struct { type DeleteProcessRequest struct {
ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
ProcessID string `protobuf:"bytes,2,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`
} }
func (m *DeleteProcessRequest) Reset() { *m = DeleteProcessRequest{} } func (m *DeleteProcessRequest) Reset() { *m = DeleteProcessRequest{} }
@ -280,7 +279,7 @@ func (*DeleteProcessRequest) ProtoMessage() {}
func (*DeleteProcessRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{19} } func (*DeleteProcessRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{19} }
type ListProcessesRequest struct { type ListProcessesRequest struct {
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
} }
func (m *ListProcessesRequest) Reset() { *m = ListProcessesRequest{} } func (m *ListProcessesRequest) Reset() { *m = ListProcessesRequest{} }
@ -438,9 +437,8 @@ func (this *Process) GoString() string {
if this == nil { if this == nil {
return "nil" return "nil"
} }
s := make([]string, 0, 12) s := make([]string, 0, 11)
s = append(s, "&execution.Process{") s = append(s, "&execution.Process{")
s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n")
s = append(s, "Pid: "+fmt.Sprintf("%#v", this.Pid)+",\n") s = append(s, "Pid: "+fmt.Sprintf("%#v", this.Pid)+",\n")
s = append(s, "Args: "+fmt.Sprintf("%#v", this.Args)+",\n") s = append(s, "Args: "+fmt.Sprintf("%#v", this.Args)+",\n")
s = append(s, "Env: "+fmt.Sprintf("%#v", this.Env)+",\n") s = append(s, "Env: "+fmt.Sprintf("%#v", this.Env)+",\n")
@ -525,7 +523,7 @@ func (this *GetProcessRequest) GoString() string {
s := make([]string, 0, 6) s := make([]string, 0, 6)
s = append(s, "&execution.GetProcessRequest{") s = append(s, "&execution.GetProcessRequest{")
s = append(s, "ContainerID: "+fmt.Sprintf("%#v", this.ContainerID)+",\n") s = append(s, "ContainerID: "+fmt.Sprintf("%#v", this.ContainerID)+",\n")
s = append(s, "ProcessID: "+fmt.Sprintf("%#v", this.ProcessID)+",\n") s = append(s, "Pid: "+fmt.Sprintf("%#v", this.Pid)+",\n")
s = append(s, "}") s = append(s, "}")
return strings.Join(s, "") return strings.Join(s, "")
} }
@ -548,7 +546,7 @@ func (this *SignalProcessRequest) GoString() string {
s := make([]string, 0, 7) s := make([]string, 0, 7)
s = append(s, "&execution.SignalProcessRequest{") s = append(s, "&execution.SignalProcessRequest{")
s = append(s, "ContainerID: "+fmt.Sprintf("%#v", this.ContainerID)+",\n") s = append(s, "ContainerID: "+fmt.Sprintf("%#v", this.ContainerID)+",\n")
s = append(s, "ProcessID: "+fmt.Sprintf("%#v", this.ProcessID)+",\n") s = append(s, "Pid: "+fmt.Sprintf("%#v", this.Pid)+",\n")
s = append(s, "Signal: "+fmt.Sprintf("%#v", this.Signal)+",\n") s = append(s, "Signal: "+fmt.Sprintf("%#v", this.Signal)+",\n")
s = append(s, "}") s = append(s, "}")
return strings.Join(s, "") return strings.Join(s, "")
@ -560,7 +558,7 @@ func (this *DeleteProcessRequest) GoString() string {
s := make([]string, 0, 6) s := make([]string, 0, 6)
s = append(s, "&execution.DeleteProcessRequest{") s = append(s, "&execution.DeleteProcessRequest{")
s = append(s, "ContainerID: "+fmt.Sprintf("%#v", this.ContainerID)+",\n") s = append(s, "ContainerID: "+fmt.Sprintf("%#v", this.ContainerID)+",\n")
s = append(s, "ProcessID: "+fmt.Sprintf("%#v", this.ProcessID)+",\n") s = append(s, "Pid: "+fmt.Sprintf("%#v", this.Pid)+",\n")
s = append(s, "}") s = append(s, "}")
return strings.Join(s, "") return strings.Join(s, "")
} }
@ -570,7 +568,7 @@ func (this *ListProcessesRequest) GoString() string {
} }
s := make([]string, 0, 5) s := make([]string, 0, 5)
s = append(s, "&execution.ListProcessesRequest{") s = append(s, "&execution.ListProcessesRequest{")
s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n") s = append(s, "ContainerID: "+fmt.Sprintf("%#v", this.ContainerID)+",\n")
s = append(s, "}") s = append(s, "}")
return strings.Join(s, "") return strings.Join(s, "")
} }
@ -1433,20 +1431,14 @@ func (m *Process) MarshalTo(dAtA []byte) (int, error) {
_ = i _ = i
var l int var l int
_ = l _ = l
if len(m.ID) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintExecution(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
if m.Pid != 0 { if m.Pid != 0 {
dAtA[i] = 0x10 dAtA[i] = 0x8
i++ i++
i = encodeVarintExecution(dAtA, i, uint64(m.Pid)) i = encodeVarintExecution(dAtA, i, uint64(m.Pid))
} }
if len(m.Args) > 0 { if len(m.Args) > 0 {
for _, s := range m.Args { for _, s := range m.Args {
dAtA[i] = 0x1a dAtA[i] = 0x12
i++ i++
l = len(s) l = len(s)
for l >= 1<<7 { for l >= 1<<7 {
@ -1461,7 +1453,7 @@ func (m *Process) MarshalTo(dAtA []byte) (int, error) {
} }
if len(m.Env) > 0 { if len(m.Env) > 0 {
for _, s := range m.Env { for _, s := range m.Env {
dAtA[i] = 0x22 dAtA[i] = 0x1a
i++ i++
l = len(s) l = len(s)
for l >= 1<<7 { for l >= 1<<7 {
@ -1475,7 +1467,7 @@ func (m *Process) MarshalTo(dAtA []byte) (int, error) {
} }
} }
if m.User != nil { if m.User != nil {
dAtA[i] = 0x2a dAtA[i] = 0x22
i++ i++
i = encodeVarintExecution(dAtA, i, uint64(m.User.Size())) i = encodeVarintExecution(dAtA, i, uint64(m.User.Size()))
n5, err := m.User.MarshalTo(dAtA[i:]) n5, err := m.User.MarshalTo(dAtA[i:])
@ -1485,13 +1477,13 @@ func (m *Process) MarshalTo(dAtA []byte) (int, error) {
i += n5 i += n5
} }
if len(m.Cwd) > 0 { if len(m.Cwd) > 0 {
dAtA[i] = 0x32 dAtA[i] = 0x2a
i++ i++
i = encodeVarintExecution(dAtA, i, uint64(len(m.Cwd))) i = encodeVarintExecution(dAtA, i, uint64(len(m.Cwd)))
i += copy(dAtA[i:], m.Cwd) i += copy(dAtA[i:], m.Cwd)
} }
if m.Terminal { if m.Terminal {
dAtA[i] = 0x38 dAtA[i] = 0x30
i++ i++
if m.Terminal { if m.Terminal {
dAtA[i] = 1 dAtA[i] = 1
@ -1501,7 +1493,7 @@ func (m *Process) MarshalTo(dAtA []byte) (int, error) {
i++ i++
} }
if m.ExitStatus != 0 { if m.ExitStatus != 0 {
dAtA[i] = 0x40 dAtA[i] = 0x38
i++ i++
i = encodeVarintExecution(dAtA, i, uint64(m.ExitStatus)) i = encodeVarintExecution(dAtA, i, uint64(m.ExitStatus))
} }
@ -1704,11 +1696,10 @@ func (m *GetProcessRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintExecution(dAtA, i, uint64(len(m.ContainerID))) i = encodeVarintExecution(dAtA, i, uint64(len(m.ContainerID)))
i += copy(dAtA[i:], m.ContainerID) i += copy(dAtA[i:], m.ContainerID)
} }
if len(m.ProcessID) > 0 { if m.Pid != 0 {
dAtA[i] = 0x12 dAtA[i] = 0x10
i++ i++
i = encodeVarintExecution(dAtA, i, uint64(len(m.ProcessID))) i = encodeVarintExecution(dAtA, i, uint64(m.Pid))
i += copy(dAtA[i:], m.ProcessID)
} }
return i, nil return i, nil
} }
@ -1762,11 +1753,10 @@ func (m *SignalProcessRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintExecution(dAtA, i, uint64(len(m.ContainerID))) i = encodeVarintExecution(dAtA, i, uint64(len(m.ContainerID)))
i += copy(dAtA[i:], m.ContainerID) i += copy(dAtA[i:], m.ContainerID)
} }
if len(m.ProcessID) > 0 { if m.Pid != 0 {
dAtA[i] = 0x12 dAtA[i] = 0x10
i++ i++
i = encodeVarintExecution(dAtA, i, uint64(len(m.ProcessID))) i = encodeVarintExecution(dAtA, i, uint64(m.Pid))
i += copy(dAtA[i:], m.ProcessID)
} }
if m.Signal != 0 { if m.Signal != 0 {
dAtA[i] = 0x18 dAtA[i] = 0x18
@ -1797,11 +1787,10 @@ func (m *DeleteProcessRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintExecution(dAtA, i, uint64(len(m.ContainerID))) i = encodeVarintExecution(dAtA, i, uint64(len(m.ContainerID)))
i += copy(dAtA[i:], m.ContainerID) i += copy(dAtA[i:], m.ContainerID)
} }
if len(m.ProcessID) > 0 { if m.Pid != 0 {
dAtA[i] = 0x12 dAtA[i] = 0x10
i++ i++
i = encodeVarintExecution(dAtA, i, uint64(len(m.ProcessID))) i = encodeVarintExecution(dAtA, i, uint64(m.Pid))
i += copy(dAtA[i:], m.ProcessID)
} }
return i, nil return i, nil
} }
@ -1821,11 +1810,11 @@ func (m *ListProcessesRequest) MarshalTo(dAtA []byte) (int, error) {
_ = i _ = i
var l int var l int
_ = l _ = l
if len(m.ID) > 0 { if len(m.ContainerID) > 0 {
dAtA[i] = 0xa dAtA[i] = 0xa
i++ i++
i = encodeVarintExecution(dAtA, i, uint64(len(m.ID))) i = encodeVarintExecution(dAtA, i, uint64(len(m.ContainerID)))
i += copy(dAtA[i:], m.ID) i += copy(dAtA[i:], m.ContainerID)
} }
return i, nil return i, nil
} }
@ -2036,10 +2025,6 @@ func (m *Container) Size() (n int) {
func (m *Process) Size() (n int) { func (m *Process) Size() (n int) {
var l int var l int
_ = l _ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovExecution(uint64(l))
}
if m.Pid != 0 { if m.Pid != 0 {
n += 1 + sovExecution(uint64(m.Pid)) n += 1 + sovExecution(uint64(m.Pid))
} }
@ -2152,9 +2137,8 @@ func (m *GetProcessRequest) Size() (n int) {
if l > 0 { if l > 0 {
n += 1 + l + sovExecution(uint64(l)) n += 1 + l + sovExecution(uint64(l))
} }
l = len(m.ProcessID) if m.Pid != 0 {
if l > 0 { n += 1 + sovExecution(uint64(m.Pid))
n += 1 + l + sovExecution(uint64(l))
} }
return n return n
} }
@ -2176,9 +2160,8 @@ func (m *SignalProcessRequest) Size() (n int) {
if l > 0 { if l > 0 {
n += 1 + l + sovExecution(uint64(l)) n += 1 + l + sovExecution(uint64(l))
} }
l = len(m.ProcessID) if m.Pid != 0 {
if l > 0 { n += 1 + sovExecution(uint64(m.Pid))
n += 1 + l + sovExecution(uint64(l))
} }
if m.Signal != 0 { if m.Signal != 0 {
n += 1 + sovExecution(uint64(m.Signal)) n += 1 + sovExecution(uint64(m.Signal))
@ -2193,9 +2176,8 @@ func (m *DeleteProcessRequest) Size() (n int) {
if l > 0 { if l > 0 {
n += 1 + l + sovExecution(uint64(l)) n += 1 + l + sovExecution(uint64(l))
} }
l = len(m.ProcessID) if m.Pid != 0 {
if l > 0 { n += 1 + sovExecution(uint64(m.Pid))
n += 1 + l + sovExecution(uint64(l))
} }
return n return n
} }
@ -2203,7 +2185,7 @@ func (m *DeleteProcessRequest) Size() (n int) {
func (m *ListProcessesRequest) Size() (n int) { func (m *ListProcessesRequest) Size() (n int) {
var l int var l int
_ = l _ = l
l = len(m.ID) l = len(m.ContainerID)
if l > 0 { if l > 0 {
n += 1 + l + sovExecution(uint64(l)) n += 1 + l + sovExecution(uint64(l))
} }
@ -2344,7 +2326,6 @@ func (this *Process) String() string {
return "nil" return "nil"
} }
s := strings.Join([]string{`&Process{`, s := strings.Join([]string{`&Process{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
`Args:` + fmt.Sprintf("%v", this.Args) + `,`, `Args:` + fmt.Sprintf("%v", this.Args) + `,`,
`Env:` + fmt.Sprintf("%v", this.Env) + `,`, `Env:` + fmt.Sprintf("%v", this.Env) + `,`,
@ -2425,7 +2406,7 @@ func (this *GetProcessRequest) String() string {
} }
s := strings.Join([]string{`&GetProcessRequest{`, s := strings.Join([]string{`&GetProcessRequest{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
`ProcessID:` + fmt.Sprintf("%v", this.ProcessID) + `,`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
`}`, `}`,
}, "") }, "")
return s return s
@ -2446,7 +2427,7 @@ func (this *SignalProcessRequest) String() string {
} }
s := strings.Join([]string{`&SignalProcessRequest{`, s := strings.Join([]string{`&SignalProcessRequest{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
`ProcessID:` + fmt.Sprintf("%v", this.ProcessID) + `,`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
`Signal:` + fmt.Sprintf("%v", this.Signal) + `,`, `Signal:` + fmt.Sprintf("%v", this.Signal) + `,`,
`}`, `}`,
}, "") }, "")
@ -2458,7 +2439,7 @@ func (this *DeleteProcessRequest) String() string {
} }
s := strings.Join([]string{`&DeleteProcessRequest{`, s := strings.Join([]string{`&DeleteProcessRequest{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
`ProcessID:` + fmt.Sprintf("%v", this.ProcessID) + `,`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
`}`, `}`,
}, "") }, "")
return s return s
@ -2468,7 +2449,7 @@ func (this *ListProcessesRequest) String() string {
return "nil" return "nil"
} }
s := strings.Join([]string{`&ListProcessesRequest{`, s := strings.Join([]string{`&ListProcessesRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
`}`, `}`,
}, "") }, "")
return s return s
@ -3618,35 +3599,6 @@ func (m *Process) Unmarshal(dAtA []byte) error {
} }
switch fieldNum { switch fieldNum {
case 1: 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
case 2:
if wireType != 0 { if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType)
} }
@ -3665,7 +3617,7 @@ func (m *Process) Unmarshal(dAtA []byte) error {
break break
} }
} }
case 3: case 2:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType)
} }
@ -3694,7 +3646,7 @@ func (m *Process) Unmarshal(dAtA []byte) error {
} }
m.Args = append(m.Args, string(dAtA[iNdEx:postIndex])) m.Args = append(m.Args, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex iNdEx = postIndex
case 4: case 3:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType)
} }
@ -3723,7 +3675,7 @@ func (m *Process) Unmarshal(dAtA []byte) error {
} }
m.Env = append(m.Env, string(dAtA[iNdEx:postIndex])) m.Env = append(m.Env, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex iNdEx = postIndex
case 5: case 4:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
} }
@ -3756,7 +3708,7 @@ func (m *Process) Unmarshal(dAtA []byte) error {
return err return err
} }
iNdEx = postIndex iNdEx = postIndex
case 6: case 5:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Cwd", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Cwd", wireType)
} }
@ -3785,7 +3737,7 @@ func (m *Process) Unmarshal(dAtA []byte) error {
} }
m.Cwd = string(dAtA[iNdEx:postIndex]) m.Cwd = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 7: case 6:
if wireType != 0 { if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Terminal", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Terminal", wireType)
} }
@ -3805,7 +3757,7 @@ func (m *Process) Unmarshal(dAtA []byte) error {
} }
} }
m.Terminal = bool(v != 0) m.Terminal = bool(v != 0)
case 8: case 7:
if wireType != 0 { if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ExitStatus", wireType) return fmt.Errorf("proto: wrong wireType = %d for field ExitStatus", wireType)
} }
@ -4482,10 +4434,10 @@ func (m *GetProcessRequest) Unmarshal(dAtA []byte) error {
m.ContainerID = string(dAtA[iNdEx:postIndex]) m.ContainerID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 2: case 2:
if wireType != 2 { if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ProcessID", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType)
} }
var stringLen uint64 m.Pid = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflowExecution return ErrIntOverflowExecution
@ -4495,21 +4447,11 @@ func (m *GetProcessRequest) Unmarshal(dAtA []byte) error {
} }
b := dAtA[iNdEx] b := dAtA[iNdEx]
iNdEx++ iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift m.Pid |= (uint32(b) & 0x7F) << shift
if b < 0x80 { if b < 0x80 {
break break
} }
} }
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthExecution
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ProcessID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipExecution(dAtA[iNdEx:]) skippy, err := skipExecution(dAtA[iNdEx:])
@ -4673,10 +4615,10 @@ func (m *SignalProcessRequest) Unmarshal(dAtA []byte) error {
m.ContainerID = string(dAtA[iNdEx:postIndex]) m.ContainerID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 2: case 2:
if wireType != 2 { if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ProcessID", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType)
} }
var stringLen uint64 m.Pid = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflowExecution return ErrIntOverflowExecution
@ -4686,21 +4628,11 @@ func (m *SignalProcessRequest) Unmarshal(dAtA []byte) error {
} }
b := dAtA[iNdEx] b := dAtA[iNdEx]
iNdEx++ iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift m.Pid |= (uint32(b) & 0x7F) << shift
if b < 0x80 { if b < 0x80 {
break break
} }
} }
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthExecution
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ProcessID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3: case 3:
if wireType != 0 { if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Signal", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Signal", wireType)
@ -4800,10 +4732,10 @@ func (m *DeleteProcessRequest) Unmarshal(dAtA []byte) error {
m.ContainerID = string(dAtA[iNdEx:postIndex]) m.ContainerID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 2: case 2:
if wireType != 2 { if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ProcessID", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType)
} }
var stringLen uint64 m.Pid = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflowExecution return ErrIntOverflowExecution
@ -4813,21 +4745,11 @@ func (m *DeleteProcessRequest) Unmarshal(dAtA []byte) error {
} }
b := dAtA[iNdEx] b := dAtA[iNdEx]
iNdEx++ iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift m.Pid |= (uint32(b) & 0x7F) << shift
if b < 0x80 { if b < 0x80 {
break break
} }
} }
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthExecution
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ProcessID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipExecution(dAtA[iNdEx:]) skippy, err := skipExecution(dAtA[iNdEx:])
@ -4880,7 +4802,7 @@ func (m *ListProcessesRequest) Unmarshal(dAtA []byte) error {
switch fieldNum { switch fieldNum {
case 1: case 1:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType)
} }
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
@ -4905,7 +4827,7 @@ func (m *ListProcessesRequest) Unmarshal(dAtA []byte) error {
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
} }
m.ID = string(dAtA[iNdEx:postIndex]) m.ContainerID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
@ -5117,69 +5039,68 @@ var (
func init() { proto.RegisterFile("execution.proto", fileDescriptorExecution) } func init() { proto.RegisterFile("execution.proto", fileDescriptorExecution) }
var fileDescriptorExecution = []byte{ var fileDescriptorExecution = []byte{
// 1018 bytes of a gzipped FileDescriptorProto // 998 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0xe3, 0x44, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x56, 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, 0x9c, 0xcb, 0xf6, 0x0d, 0x94, 0x63, 0xc6, 0x94, 0x62, 0xcb, 0xb2, 0xc0,
0x81, 0x1c, 0x31, 0xbd, 0x44, 0xb4, 0x34, 0x4b, 0x5c, 0x18, 0xed, 0x4b, 0x90, 0x23, 0xc6, 0x94, 0xfa, 0x9d, 0xc5, 0xa0, 0x20, 0xef, 0xc3, 0xb7, 0x5f, 0x5c, 0x35, 0x56, 0xfe, 0xbc, 0x6a, 0xac,
0x88, 0x96, 0x66, 0x73, 0xb5, 0x7b, 0xcb, 0x41, 0xbe, 0xee, 0xe3, 0x37, 0x5f, 0xde, 0xd6, 0x37, 0xfc, 0x7b, 0xd5, 0x50, 0x7e, 0x99, 0x34, 0x94, 0x17, 0x93, 0x86, 0xf2, 0xc7, 0xa4, 0xa1, 0xfc,
0x7e, 0xbb, 0xad, 0x6f, 0xfc, 0x75, 0x5b, 0x97, 0x7e, 0x98, 0xd6, 0xa5, 0x97, 0xd3, 0xba, 0xf4, 0x3d, 0x69, 0x28, 0xe7, 0x05, 0xa1, 0xe4, 0xc3, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x24, 0xc6,
0xcb, 0xb4, 0x2e, 0xfd, 0x31, 0xad, 0x4b, 0x17, 0x79, 0xce, 0xe4, 0x83, 0xbf, 0x03, 0x00, 0x00, 0xc8, 0x88, 0x60, 0x0d, 0x00, 0x00,
0xff, 0xff, 0xb4, 0x16, 0x52, 0xf1, 0xb1, 0x0d, 0x00, 0x00,
} }

View file

@ -74,14 +74,13 @@ message Container {
} }
message Process { message Process {
string id = 1 [(gogoproto.customname) = "ID"]; uint32 pid = 1;
uint32 pid = 2; repeated string args = 2;
repeated string args = 3; repeated string env = 3;
repeated string env = 4; User user = 4;
User user = 5; string cwd = 5;
string cwd = 6; bool terminal = 6;
bool terminal = 7; uint32 exit_status = 7;
uint32 exit_status = 8;
} }
enum Status { enum Status {
@ -120,7 +119,7 @@ message ResumeContainerRequest {
message GetProcessRequest { message GetProcessRequest {
string container_id = 1 [(gogoproto.customname) = "ContainerID"]; string container_id = 1 [(gogoproto.customname) = "ContainerID"];
string process_id = 2 [(gogoproto.customname) = "ProcessID"]; uint32 pid = 2;
} }
message GetProcessResponse { message GetProcessResponse {
@ -129,17 +128,17 @@ message GetProcessResponse {
message SignalProcessRequest { message SignalProcessRequest {
string container_id = 1 [(gogoproto.customname) = "ContainerID"]; string container_id = 1 [(gogoproto.customname) = "ContainerID"];
string process_id = 2 [(gogoproto.customname) = "ProcessID"]; uint32 pid = 2;
uint32 signal = 3; uint32 signal = 3;
} }
message DeleteProcessRequest { message DeleteProcessRequest {
string container_id = 1 [(gogoproto.customname) = "ContainerID"]; string container_id = 1 [(gogoproto.customname) = "ContainerID"];
string process_id = 2 [(gogoproto.customname) = "ProcessID"]; uint32 pid = 2;
} }
message ListProcessesRequest { message ListProcessesRequest {
string id = 1 [(gogoproto.customname) = "ID"]; string container_id = 1 [(gogoproto.customname) = "ContainerID"];
} }
message ListProcessesResponse { message ListProcessesResponse {

View file

@ -9,7 +9,6 @@ import (
"net/url" "net/url"
"os" "os"
"os/signal" "os/signal"
"path/filepath"
"runtime" "runtime"
"strconv" "strconv"
"strings" "strings"
@ -135,11 +134,6 @@ func main() {
execCtx := log.WithModule(ctx, "execution") execCtx := log.WithModule(ctx, "execution")
execCtx = events.WithPoster(execCtx, events.GetNATSPoster(nec)) execCtx = events.WithPoster(execCtx, events.GetNATSPoster(nec))
root := filepath.Join(context.GlobalString("root"), "shim")
err = os.Mkdir(root, 0700)
if err != nil && !os.IsExist(err) {
return err
}
execService, err := supervisor.New(execCtx, context.GlobalString("root")) execService, err := supervisor.New(execCtx, context.GlobalString("root"))
if err != nil { if err != nil {
return err return err

View file

@ -29,11 +29,11 @@ var deleteCommand = cli.Command{
return fmt.Errorf("container id must be provided") return fmt.Errorf("container id must be provided")
} }
pid := context.String("pid") pid := uint32(context.Int64("pid"))
if pid != "" { if pid != 0 {
_, err = executionService.DeleteProcess(gocontext.Background(), &execution.DeleteProcessRequest{ _, err = executionService.DeleteProcess(gocontext.Background(), &execution.DeleteProcessRequest{
ContainerID: id, ContainerID: id,
ProcessID: pid, Pid: pid,
}) })
if err != nil { if err != nil {
return err return err

View file

@ -3,6 +3,7 @@ package main
import ( import (
"os" "os"
"path/filepath" "path/filepath"
"time"
gocontext "context" gocontext "context"
@ -18,10 +19,6 @@ var execCommand = cli.Command{
Name: "id, i", Name: "id, i",
Usage: "target container id", Usage: "target container id",
}, },
cli.StringFlag{
Name: "pid, p",
Usage: "new process id",
},
cli.StringFlag{ cli.StringFlag{
Name: "cwd, c", Name: "cwd, c",
Usage: "current working directory for the process", Usage: "current working directory for the process",
@ -42,7 +39,7 @@ var execCommand = cli.Command{
return err return err
} }
id := context.String("id") id := time.Now().Format("2006-_2-01_15:04:05")
tmpDir, err := getTempDir(id) tmpDir, err := getTempDir(id)
if err != nil { if err != nil {
return err return err
@ -52,7 +49,6 @@ var execCommand = cli.Command{
sOpts := &execution.StartProcessRequest{ sOpts := &execution.StartProcessRequest{
ContainerID: id, ContainerID: id,
Process: &execution.Process{ Process: &execution.Process{
ID: context.String("pid"),
Cwd: context.String("cwd"), Cwd: context.String("cwd"),
Terminal: context.Bool("tty"), Terminal: context.Bool("tty"),
Args: context.Args(), Args: context.Args(),
@ -76,7 +72,7 @@ var execCommand = cli.Command{
_, err = executionService.DeleteProcess(gocontext.Background(), &execution.DeleteProcessRequest{ _, err = executionService.DeleteProcess(gocontext.Background(), &execution.DeleteProcessRequest{
ContainerID: id, ContainerID: id,
ProcessID: sr.Process.ID, Pid: sr.Process.Pid,
}) })
if err != nil { if err != nil {
return err return err

View file

@ -28,7 +28,7 @@ var inspectCommand = cli.Command{
return err return err
} }
listProcResponse, err := executionService.ListProcesses(gocontext.Background(), listProcResponse, err := executionService.ListProcesses(gocontext.Background(),
&execution.ListProcessesRequest{ID: id}) &execution.ListProcessesRequest{ContainerID: id})
if err != nil { if err != nil {
return err return err
} }

View file

@ -25,7 +25,7 @@ var listCommand = cli.Command{
fmt.Printf("ID\tSTATUS\tPROCS\tBUNDLE\n") fmt.Printf("ID\tSTATUS\tPROCS\tBUNDLE\n")
for _, c := range listResponse.Containers { for _, c := range listResponse.Containers {
listProcResponse, err := executionService.ListProcesses(gocontext.Background(), listProcResponse, err := executionService.ListProcesses(gocontext.Background(),
&execution.ListProcessesRequest{ID: c.ID}) &execution.ListProcessesRequest{ContainerID: c.ID})
if err != nil { if err != nil {
return err return err
} }

View file

@ -118,7 +118,7 @@ var runCommand = cli.Command{
break eventLoop break eventLoop
} }
if e.ID == cr.Container.ID && e.PID == cr.InitProcess.ID { if e.ID == cr.Container.ID && e.PID == cr.InitProcess.Pid {
ec = e.StatusCode ec = e.StatusCode
break eventLoop break eventLoop
} }

View file

@ -10,7 +10,7 @@ type ContainerEvent struct {
type ContainerExitEvent struct { type ContainerExitEvent struct {
ContainerEvent ContainerEvent
PID string PID uint32
StatusCode uint32 StatusCode uint32
} }