containerd / containerd/runwasi

Implement the rest of the `Task` trait

Open
#207 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.3k
Forks
131
PR merge metrics
No merged PRs in 30d

Description

I am creating this issue to track the remaining rpcs in the Task trait that `containerd-shim-wasm` hasn't implemented yet. Some are worth to implement and others aren't (like `ResizePty`). I am particularly interested to see `Stats` being implemented so that the shim could return the cgroup stats of a running container back to containerd.

### The Task service

```proto
// Shim service is launched for each container and is responsible for owning the IO
// for the container and its additional processes. The shim is also the parent of
// each container and allows reattaching to the IO and receiving the exit status
// for the container processes.
service Task {
rpc State(StateRequest) returns (StateResponse);
rpc Create(CreateTaskRequest) returns (CreateTaskResponse);
rpc Start(StartRequest) returns (StartResponse);
rpc Delete(DeleteRequest) returns (DeleteResponse);
rpc Pids(PidsRequest) returns (PidsResponse);
rpc Pause(PauseRequest) returns (google.protobuf.Empty);
rpc Resume(ResumeRequest) returns (google.protobuf.Empty);
rpc Checkpoint(CheckpointTaskRequest) returns (google.protobuf.Empty);
rpc Kill(KillRequest) returns (google.protobuf.Empty);
rpc Exec(ExecProcessRequest) returns (google.protobuf.Empty);
rpc ResizePty(ResizePtyRequest) returns (google.protobuf.Empty);
rpc CloseIO(CloseIORequest) returns (google.protobuf.Empty);
rpc Update(UpdateTaskRequest) returns (google.protobuf.Empty);
rpc Wait(WaitRequest) returns (WaitResponse);
rpc Stats(StatsRequest) returns (StatsResponse);
rpc Connect(ConnectRequest) returns (ConnectResponse);
rpc Shutdown(ShutdownRequest) returns (google.protobuf.Empty);
}
```

from https://github.com/containerd/containerd/blob/main/api/runtime/task/v2/shim.proto#L29C3-L51

### What's missing from `containerd-shim-wasm`
- [x] state()
- [x] create()
- [x] start()
- [x] delete()
- [ ] pids() → return all pids inside the container
- [ ] pause() -> pauses the container process
- [ ] resume() -> resumes the container process
- [ ] #222
- [x] kill()
- [ ] exec() → execute additional process inside the container
- [ ] resize_pty() → ResizePty resizes the processes pty/console
- [ ] #223
- [ ] update() → update task settings
- [x] wait()
- [x] #208
- [x] connect()
- [x] shutdown()

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.