hyperhq / runv

Hypervisor-based Runtime for OCI
Apache License 2.0
826 stars 129 forks source link

interface additions: kill -a flag, ps command, pause & resume #478

Closed tvelocity closed 7 years ago

tvelocity commented 7 years ago

These two patches add two runc features to runv; the --all flag to kill, and the PS command. Implementing these interfaces, reveals some limitations with the current design.

Runv currently implements the OCI interface by wrapping runv-containerd calls, so we are limited by the containerd interface as supported by runv at the moment. This introduces some limitations on these implementations, which to resolve would require the refactoring or runv, which IMHO should be discussed.

First, the processes runv is aware of from each container is limited to only the processes started directly from runv (via run and exec). Children are not being tracked. An extension in hyperstart would be needed to overcome this limitation (to always fetch the process list dynamically).

Additionally, runv-containerd reports only limited information about the processes running inside the container. We can not show the PID for example. I'm not sure whether extending hyperstart to provide this info is enough, as we need to consider how it will affect runv-containerd. Even then, we will be limited by the current fields in the containerd API. In any case runv-containerd and the runv OCI interface need to be considered at the same time to improve upon this point.

tvelocity commented 7 years ago

Added a pause & resume implementation. Same limitation as kill -a, I think an interface need to be added to hyperstart to return info about running processes to runv.

WeiZhang555 commented 7 years ago

ping @tvelocity , I think you need to do a rebase, the client lib has changed. :cat:

tvelocity commented 7 years ago

The merge request has been updated with a rebase onto the latest master

WeiZhang555 commented 7 years ago

ping @laijs @gnawux Please take a look at this :smile:

laijs commented 7 years ago

It seems the pr is ready to be reviewed/merged. I will remove the [RFC] in the title.

laijs commented 7 years ago

Good job. thanks.