-
Notifications
You must be signed in to change notification settings - Fork 55
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
Extract cgroup in bpf programs #240
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing stuff! Just couple of comments. And since the podman PR is merged, let's rebase this one with main?
c8a9fc9
to
7f296f9
Compare
Before this change, we were using `podman inspect` command to get information about libpod containers. But since Pulsar is running as root, using CLI is not going to show any information about rootless containers. This is fixed by using sqlite (which is used internally by libpod) and `images.json` file to resolve all necessary information about containers. To handle rootless containers gracefully, we check whether any user with their own home directory has a libpod database.
On such system, the following cgroup info was found: ``` 0::/machine.slice/libpod-conmon-551ccf517b3394[...].scope ``` Handle it in our regular expression.
6bc2d74
to
cb6ab46
Compare
cb6ab46
to
78a962f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one nit, otherwise looks good 👍 I can also confirm that it works for me (with docker
, podman
and sudo podman
). I would say - feel free to merge after addressing my comment about panic.
This PR wants to change the way cgroups are collected for processes at runtime.
The idea is to move cgroup extraction to BPF because
procfs
is not reliable.remaining tasks
cgroups->subsys
. panic: enum relocation index out of bounds aya-rs/aya#868nut
Index out of range Reeywhaar/nut#4vmlinux.h
withmemory_cgrp_id
forx86_64
chore: Update vmlinux headers to 6.7.2 #241is_new_container
functions and map