Skip to content

Conversation

@ningmingxiao
Copy link
Contributor

@ningmingxiao ningmingxiao commented Jun 26, 2024

fix:#10390
@dmcgowan @fuweid @AkihiroSuda
can you review my new pr ?

@k8s-ci-robot
Copy link

Hi @ningmingxiao. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ningmingxiao ningmingxiao force-pushed the fix_event_lost branch 2 times, most recently from b15f04a to ebf9227 Compare June 26, 2024 07:31
@ningmingxiao ningmingxiao changed the title fix event lost when restart containerd cri:fix container event can't be handled by containerd when restart containerd Jun 26, 2024
@ningmingxiao ningmingxiao changed the title cri:fix container event can't be handled by containerd when restart containerd cri: fix container event can't be handled by containerd when restart containerd Jun 26, 2024
@ningmingxiao ningmingxiao force-pushed the fix_event_lost branch 4 times, most recently from d766e3e to 9db6416 Compare June 27, 2024 02:23
@ningmingxiao
Copy link
Contributor Author

ningmingxiao commented Jun 27, 2024

how it happened?
when restart containerd
A:
func (c *criService) recover(ctx context.Context) ->loadContainer->startContainerExitMonitor

startContainerExitMonitor
go func (){
c.containerStore.Get(e.id)
}

B:
func (c *criService) recover(ctx context.Context) -> containerStore.Add

if A (c.containerStore.Get) is running before B, if container event is coming,events will be droped

cntr, err := em.c.containerStore.Get(e.ID)

will return IsNotFound ,will skip handleContainerExit
will cause cri container status error.

containerd

Signed-off-by: ningmingxiao <ning.mingxiao@zte.com.cn>
@ningmingxiao
Copy link
Contributor Author

#11579 will fix close it.

@github-project-automation github-project-automation bot moved this from Needs Triage to Done in Pull Request Review Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants