You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: runtime/v2/README.md
+21-2Lines changed: 21 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,8 +149,27 @@ Filesystems are provided by the containerd snapshotters.
149
149
150
150
### Events
151
151
152
-
The shim MUST publish a `runtime.TaskExitEventTopic` when the container exits.
153
-
If the shim collects Out of Memory events, it SHOULD also publish a `runtime.TaskOOMEventTopic`.
152
+
The Runtime v2 supports an async event model. In order for the an upstream caller (such as Docker) to get these events in the correct order a Runtime v2 shim MUST implement the following events where `Compliance=MUST`. This avoids race conditions between the shim and shim client where for example a call to `Start` can signal a `TaskExitEventTopic` before even returning the results from the `Start` call. With these guarantees of a Runtime v2 shim a call to `Start` is required to have published the async event `TaskStartEventTopic` before the shim can publish the `TaskExitEventTopic`.
153
+
154
+
#### Tasks
155
+
156
+
| Topic | Compliance | Description |
157
+
| ----- | ---------- | ----------- |
158
+
|`runtime.TaskCreateEventTopic`| MUST | When a task is successfully created |
159
+
|`runtime.TaskStartEventTopic`| MUST (follow `TaskCreateEventTopic`) | When a task is successfully started |
160
+
|`runtime.TaskExitEventTopic`| MUST (follow `TaskStartEventTopic`) | When a task exits expected or unexpected |
161
+
|`runtime.TaskDeleteEventTopic`| MUST (follow `TaskExitEventTopic` or `TaskCreateEventTopic` if never started) | When a task is removed from a shim |
162
+
|`runtime.TaskPausedEventTopic`| SHOULD | When a task is successfully paused |
163
+
|`runtime.TaskResumedEventTopic`| SHOULD (follow `TaskPausedEventTopic`) | When a task is successfully resumed |
164
+
|`runtime.TaskCheckpointedEventTopic`| SHOULD | When a task is checkpointed |
165
+
|`runtime.TaskOOMEventTopic`| SHOULD | If the shim collects Out of Memory events |
166
+
167
+
#### Execs
168
+
169
+
| Topic | Compliance | Description |
170
+
| ----- | ---------- | ----------- |
171
+
|`runtime.TaskExecAddedEventTopic`| MUST (follow `TaskCreateEventTopic` ) | When an exec is successfully added |
172
+
|`runtime.TaskExecStartedEventTopic`| MUST (follow `TaskExecStartedEventTopic`) | When an exec is successfully started |
0 commit comments