hyperhq / runv

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

implement `runv delete` #375

Closed YaoZengzeng closed 7 years ago

YaoZengzeng commented 7 years ago

just a simple wrapper of runv kill container-id KILL

Signed-off-by: Yao Zengzeng yaozengzeng@zju.edu.cn

Crazykev commented 7 years ago

Will it fail if exec runv delete after runv kill ?

YaoZengzeng commented 7 years ago

@Crazykev In fact, we can't distinguish a container being killed before and a container that never exist. (1)、Now runv is stateless actually, the container is running or none.After kill, it just exited. (2)、There in no api of deleting in containerd.So we can just do like this to work around. Any good suggestions?

Crazykev commented 7 years ago

AFAK, for a long term, we need to follow https://github.com/opencontainers/runtime-spec/pull/513 when it land. And in runv, maybe it's more easy to figure out what is the proper way to define delete after we seprerate create and start.
And if this is only a workaround for ocid integration for now, that we need a delete. At least we need to gurantee delete after kill will not fail, that is why I would ask that.

gao-feng commented 7 years ago

deleting container is needed, please consider to implement it in containerd.

laijs commented 7 years ago

@YaoZengzeng @Crazykev runv cli is being improved continuously and had just been refactored at #537 .

Moreover, runv delete was also implemented in #537. Feel free to test it and give any possible feedback.

Thank you for your contribution.