Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Implement containerd shim v2 API for Kata Containers #572

Merged
merged 22 commits into from
Nov 28, 2018

Conversation

lifupan
Copy link
Member

@lifupan lifupan commented Aug 10, 2018

This is the init code of containerd shim v2 for kata containers, and I had done the general
test with the containerd's client command ctr and cri's crictl, both of them worked well.

Fixes #485

@katacontainersbot
Copy link
Contributor

PSS Measurement:
Qemu: 167881 KB
Proxy: 4183 KB
Shim: 8854 KB

Memory inside container:
Total Memory: 2043464 KB
Free Memory: 2004008 KB

@opendev-zuul
Copy link

opendev-zuul bot commented Aug 10, 2018

Build succeeded (third-party-check pipeline).

@katacontainersbot
Copy link
Contributor

PSS Measurement:
Qemu: 170027 KB
Proxy: 3984 KB
Shim: 8859 KB

Memory inside container:
Total Memory: 2043464 KB
Free Memory: 2003572 KB

lifupan added a commit to hyperhq/kata-runtime that referenced this pull request Aug 10, 2018
There are maybe more than one containers in a sandbox, thus
it's needed to cleanup all of those containers' mount and
id mapping files when do cleanup a sandbox.

Fixes: kata-containers#572

Signed-off-by: fupan <[email protected]>
@opendev-zuul
Copy link

opendev-zuul bot commented Aug 10, 2018

Build succeeded (third-party-check pipeline).

@katacontainersbot
Copy link
Contributor

PSS Measurement:
Qemu: 167678 KB
Proxy: 4082 KB
Shim: 8758 KB

Memory inside container:
Total Memory: 2043464 KB
Free Memory: 2002944 KB

lifupan added a commit to hyperhq/kata-runtime that referenced this pull request Aug 10, 2018
There are maybe more than one containers in a sandbox, thus
it's needed to cleanup all of those containers' mount and
id mapping files when do cleanup a sandbox.

Fixes: kata-containers#572

Signed-off-by: fupan <[email protected]>
@katacontainersbot
Copy link
Contributor

PSS Measurement:
Qemu: 170260 KB
Proxy: 4120 KB
Shim: 8906 KB

Memory inside container:
Total Memory: 2043464 KB
Free Memory: 2003992 KB

@opendev-zuul
Copy link

opendev-zuul bot commented Aug 10, 2018

Build succeeded (third-party-check pipeline).

lifupan added a commit to hyperhq/kata-runtime that referenced this pull request Aug 10, 2018
Removed some unused variables and retuned some
if/else code style.

Fixes: kata-containers#572

Signed-off-by: fupan <[email protected]>
@katacontainersbot
Copy link
Contributor

PSS Measurement:
Qemu: 169873 KB
Proxy: 4094 KB
Shim: 8905 KB

Memory inside container:
Total Memory: 2043464 KB
Free Memory: 2003860 KB

@opendev-zuul
Copy link

opendev-zuul bot commented Aug 10, 2018

Build succeeded (third-party-check pipeline).

@jodh-intel
Copy link
Contributor

Hi @lifupan - thanks for raising! This is clearly a very large PR. I'm not sure I'll be able to review it today but will review on Monday if not.

@sboeuf
Copy link

sboeuf commented Aug 10, 2018

@lifupan Thanks for submitting the implementation of Kata for containerd-shim-v2!
One thing that comes to mind, we need to introduce a bunch of integration tests for this.
You mentioned

I had done the general test with the containerd's client command ctr and cri's crictl, both of them worked well.

Could you please work with @chavafg and @GabyCT in order to introduce more testing to our CI, because I want to make sure we get no regression regarding your implementation once it gets merged.

@lifupan
Copy link
Member Author

lifupan commented Aug 11, 2018

@sboeuf Sure, no problem.

lifupan added a commit to hyperhq/kata-runtime that referenced this pull request Aug 14, 2018
Removed some unused variables and retuned some
if/else code style, at the same time, do not
export those functions and variables which will
not used out this module.

Fixes: kata-containers#572

Signed-off-by: fupan <[email protected]>
@katacontainersbot
Copy link
Contributor

PSS Measurement:
Qemu: 167640 KB
Proxy: 4126 KB
Shim: 8784 KB

Memory inside container:
Total Memory: 2043464 KB
Free Memory: 2003620 KB

lifupan added a commit to hyperhq/kata-runtime that referenced this pull request Aug 14, 2018
Removed some unused variables and retuned some
if/else code style, at the same time, do not
export those functions and variables which will
not used out this module.

Fixes: kata-containers#572

Signed-off-by: fupan <[email protected]>
@katacontainersbot
Copy link
Contributor

PSS Measurement:
Qemu: 167620 KB
Proxy: 4010 KB
Shim: 9027 KB

Memory inside container:
Total Memory: 2043464 KB
Free Memory: 2003612 KB

lifupan added a commit to hyperhq/kata-runtime that referenced this pull request Aug 14, 2018
Removed some unused variables and retuned some
if/else code style, at the same time, do not
export those functions and variables which will
not used out this module.

Fixes: kata-containers#572

Signed-off-by: fupan <[email protected]>
@katacontainersbot
Copy link
Contributor

PSS Measurement:
Qemu: 167888 KB
Proxy: 4064 KB
Shim: 8840 KB

Memory inside container:
Total Memory: 2043464 KB
Free Memory: 2003876 KB

lifupan added a commit to hyperhq/kata-runtime that referenced this pull request Aug 14, 2018
Removed some unused variables and retuned some
if/else code style, at the same time, do not
export those functions and variables which will
not used out this module.

Fixes: kata-containers#572

Signed-off-by: fupan <[email protected]>
@opendev-zuul
Copy link

opendev-zuul bot commented Aug 14, 2018

Build failed (third-party-check pipeline) integration testing with
OpenStack. For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

lifupan and others added 16 commits November 28, 2018 14:32
Add the Wait api to wait on a started container
or exec process.

Signed-off-by: fupan <[email protected]>
Add the State api support to get a container
or exec process's states.

Signed-off-by: fupan <[email protected]>
Add the Delete api support to delete a stopped
container or pod.

Signed-off-by: fupan <[email protected]>
Add the Cleanup api support to cleanup the pod and
containers running in it when the pod's corresponding
shim died.

Signed-off-by: fupan <[email protected]>
Add the Pids api support to get the processes
pids running in the pod.

Signed-off-by: fupan <[email protected]>
Add the CloseIO api support to close a process's
input stream.

Signed-off-by: fupan <[email protected]>
Add the Connect api to get the shim's info.

Signed-off-by: fupan <[email protected]>
Add the Shutdown api support to shutdown the shim.

Signed-off-by: fupan <[email protected]>
Add the Update api support to update a running
process's resouce.

Signed-off-by: fupan <[email protected]>
Add the ResizePty api support to resize the console.

Signed-off-by: ZeroMagic <[email protected]>
Add the Pause api support to pause a container running
in the pod.

Signed-off-by: ZeroMagic <[email protected]>
Add the Resume api support to resume a paused container.

Signed-off-by: ZeroMagic <[email protected]>
Add the Kill api support to send signal to a given
container process.

Signed-off-by: ZeroMagic <[email protected]>
Signed-off-by: fupan.li <[email protected]>
Add the Stats api support to get the container's
resouces statistic.

Signed-off-by: ZeroMagic <[email protected]>
Add unit test cases.

Signed-off-by: fupan <[email protected]>
Add the Makefile target of building shimv2.

Fixes: kata-containers#485

Signed-off-by: fupan <[email protected]>
@lifupan
Copy link
Member Author

lifupan commented Nov 28, 2018

/test

Copy link

@sboeuf sboeuf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we go!!! Let merge this PR :)

@sboeuf sboeuf merged commit e06c8aa into kata-containers:master Nov 28, 2018
@gnawux
Copy link
Member

gnawux commented Nov 28, 2018

Finally merged,
Thanks all the reviewers.

Time to have a beer @lifupan

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.