Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime-rs: Forward events to containerd via ttrpc #8780

Merged
merged 1 commit into from Jan 11, 2024

Conversation

justxuewei
Copy link
Member

@justxuewei justxuewei commented Jan 6, 2024

It is a little bit heavy for the runtime-rs to forward events via
containerd CLI, contrast to the ttrpc way. Plus, for runtimes that haven't
this mechanism, e.g. CRI-O, we can't get those events anywhere.

This patch introduces two types of forwarders:

  • ContainerdForwarder: Acquire ttrpc address from environment variables
    and forward events via ttrpc connection.
  • LogForwarder: Write event info into logs.

Fixes: #7881

@katacontainersbot katacontainersbot added the size/huge Largest and most complex task (probably needs breaking into small pieces) label Jan 6, 2024
@justxuewei justxuewei force-pushed the containerd-events branch 5 times, most recently from 9769fba to 5b5e397 Compare January 7, 2024 13:38
@justxuewei justxuewei force-pushed the containerd-events branch 2 times, most recently from 26ad7d1 to 3807d6a Compare January 11, 2024 02:25
Copy link
Contributor

@quanweiZhou quanweiZhou left a comment

Choose a reason for hiding this comment

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

Thanks, @justxuewei, LGTM.

It is a little bit heavy for the runtime-rs to forwards events via
containerd CLI, contrast to the ttrpc way. Plus, for runtimes that haven't
this mechanism, e.g. CRI-O, we can't get those events anywhere.

This patch introduces two types of forwarders:

- `ContainerdForwarder`: Acquire ttrpc address from environment variables
  and forward events via ttrpc connection.
- `LogForwarder`: Write event info into logs.

Fixes: kata-containers#7881

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
@justxuewei
Copy link
Member Author

/test

@justxuewei justxuewei merged commit 70305fe into kata-containers:main Jan 11, 2024
172 of 176 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test size/huge Largest and most complex task (probably needs breaking into small pieces)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

runtime-rs: Support event mechanism
4 participants