Skip to content

Commit 8b0a040

Browse files
authored
Merge pull request containerd#1268 from crosbymichael/exec-state
Add exec process states
2 parents 2533bfe + f945cdc commit 8b0a040

File tree

26 files changed

+1668
-743
lines changed

26 files changed

+1668
-743
lines changed

api/services/events/v1/container.pb.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/services/events/v1/task.pb.go

Lines changed: 235 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/services/events/v1/task.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ message TaskOOM {
5353
message TaskExecAdded {
5454
string container_id = 1;
5555
string exec_id = 2;
56+
}
57+
58+
message TaskExecStarted {
59+
string container_id = 1;
60+
string exec_id = 2;
5661
uint32 pid = 3;
5762
}
5863

api/services/tasks/v1/tasks.pb.go

Lines changed: 371 additions & 196 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/services/tasks/v1/tasks.proto

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@ service Tasks {
1616
// Create a task.
1717
rpc Create(CreateTaskRequest) returns (CreateTaskResponse);
1818

19-
// Start a task.
20-
rpc Start(StartTaskRequest) returns (google.protobuf.Empty);
19+
// Start a process.
20+
rpc Start(StartRequest) returns (StartResponse);
2121

2222
// Delete a task and on disk state.
2323
rpc Delete(DeleteTaskRequest) returns (DeleteResponse);
2424

2525
rpc DeleteProcess(DeleteProcessRequest) returns (DeleteResponse);
2626

27-
rpc Get(GetTaskRequest) returns (GetTaskResponse);
27+
rpc Get(GetRequest) returns (GetResponse);
2828

2929
rpc List(ListTasksRequest) returns (ListTasksResponse);
3030

3131
// Kill a task or process.
3232
rpc Kill(KillRequest) returns (google.protobuf.Empty);
3333

34-
rpc Exec(ExecProcessRequest) returns (ExecProcessResponse);
34+
rpc Exec(ExecProcessRequest) returns (google.protobuf.Empty);
3535

3636
rpc ResizePty(ResizePtyRequest) returns (google.protobuf.Empty);
3737

@@ -74,8 +74,13 @@ message CreateTaskResponse {
7474
uint32 pid = 2;
7575
}
7676

77-
message StartTaskRequest {
77+
message StartRequest {
7878
string container_id = 1;
79+
string exec_id = 2;
80+
}
81+
82+
message StartResponse {
83+
uint32 pid = 1;
7984
}
8085

8186
message DeleteTaskRequest {
@@ -94,20 +99,21 @@ message DeleteProcessRequest {
9499
string exec_id = 2;
95100
}
96101

97-
message GetTaskRequest {
102+
message GetRequest {
98103
string container_id = 1;
104+
string exec_id = 2;
99105
}
100106

101-
message GetTaskResponse {
102-
containerd.v1.types.Task task = 1;
107+
message GetResponse {
108+
containerd.v1.types.Process process = 1;
103109
}
104110

105111
message ListTasksRequest {
106112
string filter = 1;
107113
}
108114

109115
message ListTasksResponse {
110-
repeated containerd.v1.types.Task tasks = 1;
116+
repeated containerd.v1.types.Process tasks = 1;
111117
}
112118

113119
message KillRequest {
@@ -132,7 +138,6 @@ message ExecProcessRequest {
132138
}
133139

134140
message ExecProcessResponse {
135-
uint32 pid = 1;
136141
}
137142

138143
message ResizePtyRequest {

0 commit comments

Comments
 (0)