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

shimv2: fix the error of reaping qemu process mistakenly #964

Closed
wants to merge 2 commits into from

Conversation

lifupan
Copy link
Member

@lifupan lifupan commented Dec 3, 2018

For kata shimv2, it doesn't need to reap it's container processes
since all of them are running in VM, thus there is no need to
set it as a subreaper and also no need to take care of the SIGCHLD
singal.

So this commit will try to unset the subreaper and ignore the SIGCHLD
signal. Since ignoring the SIGCHLD signal will break the containerd
shim's events.Publisher publish method, thus here re-write a publish
function to publish the events to containerd.

Fixes: #939

Signed-off-by: fupan lifupan@gmail.com

@lifupan
Copy link
Member Author

lifupan commented Dec 3, 2018

/test

for i := 0; i < elem.NumField(); i++ {
f := elem.Field(i)
switch typeOfT.Field(i).Name {
case "address":
Copy link
Contributor

Choose a reason for hiding this comment

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

This might be a bit "too clever" ;) Since those struct elements are private, they could change and should be able to change without breaking any clients. But we would be broken here if they changed if I'm understanding this correctly?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, you are right. If they change the struct's field name, here it will fail to get the "address" and "containerdBinaryPath" value. If containerd exported this type, it will be easy for us.

Copy link
Contributor

Choose a reason for hiding this comment

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

It might be worth raising a PR on containerd shim to see if they would be prepared to make these fields public.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, to fix this issue gently there must be some adjustments in containerd side, by now I think we can workaround it in our side first and then we communicate with containerd community on how to fix it ultimately.

Copy link

Choose a reason for hiding this comment

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

I'd really appreciate if we could start the conversation with containerd community right away to get a hint at how they feel regarding this proposal. I don't want to merge to Kata Containers a workaround that might never be properly fixed if containerd community does not agree on these changes.
Please start the discussion with them by adding @jodh-intel and myself in copy!

Copy link
Member

Choose a reason for hiding this comment

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

Agree. Please open an issue with containerd for this @lifupan.

@lifupan
Copy link
Member Author

lifupan commented Dec 4, 2018

@jodh-intel @sboeuf I had opened an issue in containerd, please see containerd/containerd#2855

@sboeuf
Copy link

sboeuf commented Dec 4, 2018

thanks @lifupan

Signed-off-by: fupan <lifupan@gmail.com>
For kata shimv2, the sub-reaper isn't needed, otherwise
it will break the cmd.Run() calling in govmmQemu.LaunchQemu().

Fixes: kata-containers#939

Signed-off-by: fupan <lifupan@gmail.com>
@lifupan
Copy link
Member Author

lifupan commented Dec 11, 2018

close this PR, since I had opened another one: #1004

@lifupan lifupan closed this Dec 11, 2018
@lifupan lifupan deleted the fixchildreaped branch December 11, 2018 03:04
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants