-
Notifications
You must be signed in to change notification settings - Fork 232
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
Support fentry/fexit to replace kprobe/kretprobe #143
Comments
It looks like I added @zuzzas has #136 with both graceful handling for programs that cannot be loaded and kernel constraints. I'll try to find some time to think how to make this work with the least amount of friction. |
The performance of |
Since kprobe is not a stable ABI, so another requirement is that we may need to check for whether the symbol exists or not before load the program.
So maybe we can add a feature to check before load the program. These checks can be:
|
Is having the same config across the whole fleet the right idea to begin with? What if somebody wants to load probes based on hardware, like NICs? What if there's something CPU model specific? We can't keep adding checks to ebpf_exporter to accommodate every situation. I think there's a natural fit for external configuration management here. For physical hardware it might be whatever you use to configure the rest of it (we use Salt). For k8s you can write some sort of script that would do the equivalent work of checking any conditions you want for every program you have. It can be as simple and as customizable as a python script: #!/usr/bin/env python3
import yaml
import platform
import packaging.version
def min_kernel_version(min_version):
min_version = packaging.version.parse(min_version)
running_version = packaging.version.parse(platform.release().split("-")[0])
return running_version >= min_version
PROGRAMS = {
"timers": [],
"cgroup": [min_kernel_version("5.15")],
}
if __name__ == "__main__":
enabled = []
for name, checks in PROGRAMS.items():
if not all(checks):
continue
enabled.append(name)
programs = []
for name in enabled:
with open(f"examples/{name}.yaml", "r") as f:
config = yaml.load(f, Loader=yaml.SafeLoader)
programs.append(config["programs"][0])
print(yaml.dump({"programs": programs})) |
@bobrik Thanks |
With #145 |
We have a requirement that need to use fentry/fexit as much as possible to replace kprobe,
But some of our nodes' kernel are still in old kernel and not support fentry.
That means we need to solve following issues:
One of the solution I am thinking is:
@bobrik Any suggestion for this?
Thanks for your time.
The text was updated successfully, but these errors were encountered: