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

shim cannot be shutdown due to container list not empty #2992

Closed
YvesChan opened this issue Sep 28, 2020 · 0 comments · Fixed by #2991
Closed

shim cannot be shutdown due to container list not empty #2992

YvesChan opened this issue Sep 28, 2020 · 0 comments · Fixed by #2991
Labels
bug Incorrect behaviour needs-review Needs to be assessed by the team.

Comments

@YvesChan
Copy link
Contributor

We encountered a rare situation recently. When the PodContainer bootup time becomes longer enough due to some reason, it may cause containerd to call the shim create() interface to time out and fail. However, because the containerd's grpc call has timed out and return, the shim side continues to execute, and successfully creates a container instance and writes it to the shim service container list. Therefore, the containerd data is inconsistent with the shim. This container **won't ** be stopped and deleted. As a result, the shim process cannot be shutdown and exited after the Pause Container has been deleted.

@YvesChan YvesChan added bug Incorrect behaviour needs-review Needs to be assessed by the team. labels Sep 28, 2020
YvesChan added a commit to YvesChan/runtime that referenced this issue Sep 28, 2020
Sometimes shim process cannot be shutdown because of container list
is not empty. This container list is written in shim service, while
creating container. We find that if containerd cancel its Create
Container Request due to timeout, but runtime didn't handle it properly
and continue creating action, then this container cannot be deleted at
all. So we should make sure the ctx passed to Create Service rpc call
is effective.

Fixes: kata-containers#2992

Signed-off-by: Yves Chan <[email protected]>
YvesChan added a commit to YvesChan/runtime that referenced this issue Sep 28, 2020
Sometimes shim process cannot be shutdown because of container list
is not empty. This container list is written in shim service, while
creating container. We find that if containerd cancel its Create
Container Request due to timeout, but runtime didn't handle it properly
and continue creating action, then this container cannot be deleted at
all. So we should make sure the ctx passed to Create Service rpc call
is effective.

Fixes: kata-containers#2992

Signed-off-by: Yves Chan <[email protected]>
YvesChan added a commit to YvesChan/runtime that referenced this issue Oct 2, 2020
Sometimes shim process cannot be shutdown because of container list
is not empty. This container list is written in shim service, while
creating container. We find that if containerd cancel its Create
Container Request due to timeout, but runtime didn't handle it properly
and continue creating action, then this container cannot be deleted at
all. So we should make sure the ctx passed to Create Service rpc call
is effective.

Fixes: kata-containers#2992

Signed-off-by: Yves Chan <[email protected]>
jcvenegas pushed a commit to jcvenegas/runtime that referenced this issue Oct 19, 2020
Sometimes shim process cannot be shutdown because of container list
is not empty. This container list is written in shim service, while
creating container. We find that if containerd cancel its Create
Container Request due to timeout, but runtime didn't handle it properly
and continue creating action, then this container cannot be deleted at
all. So we should make sure the ctx passed to Create Service rpc call
is effective.

Fixes: kata-containers#2992

Signed-off-by: Yves Chan <[email protected]>
jcvenegas pushed a commit to jcvenegas/runtime that referenced this issue Oct 19, 2020
Sometimes shim process cannot be shutdown because of container list
is not empty. This container list is written in shim service, while
creating container. We find that if containerd cancel its Create
Container Request due to timeout, but runtime didn't handle it properly
and continue creating action, then this container cannot be deleted at
all. So we should make sure the ctx passed to Create Service rpc call
is effective.

Fixes: kata-containers#2992

Signed-off-by: Yves Chan <[email protected]>
jcvenegas pushed a commit to jcvenegas/runtime that referenced this issue Oct 20, 2020
Sometimes shim process cannot be shutdown because of container list
is not empty. This container list is written in shim service, while
creating container. We find that if containerd cancel its Create
Container Request due to timeout, but runtime didn't handle it properly
and continue creating action, then this container cannot be deleted at
all. So we should make sure the ctx passed to Create Service rpc call
is effective.

Fixes: kata-containers#2992

Signed-off-by: Yves Chan <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Incorrect behaviour needs-review Needs to be assessed by the team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant