-
Notifications
You must be signed in to change notification settings - Fork 872
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Container id may be incorrect if cgroup v2 is used #8462
Comments
This is a definite bug. It is affecting my instrumented applications deployed in Azure K8s Service v1.25.6 using containerd runtime as well. Here is the resource attributes that I see in the Otel Collector logs:
Here is the output of kubectl describe pod output that shows the actual containerID as 6de3882f3f5729b1648d9c5ab1f40dbc90bf6acc2ca08dc3c879c35da1c893a4 :
Here is the output of another command that shows the same containerID 6de3882f3f5729b1648d9c5ab1f40dbc90bf6acc2ca08dc3c879c35da1c893a4 :
Here is the output of the /proc/self/mountinfo from the container:
JavaAgent v1.26 is in deed getting incorrect containerID from /proc/self/mountinfo. CC: @PeterF778 , @svrnm , @lo-jason |
@biswajit-nanda see my comment on #6694, no matter how we approach this by reading the container id from files, we will always be depending on a hack and not a real solution |
When running in a cgroup v2 container, the Java agent attempts to discover the container-id by reading
/proc/self/mountinfo
and adds it to the reported Resources. However, it has been observed that the container id from that file may be incorrect.Running from within container:
while the true container id is different
To reproduce, use a recent version of docker (which uses cgroup v2) and kubernetes.
The code which reads /proc/self/mountinfo was added by this PR
The text was updated successfully, but these errors were encountered: