You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Widespread cgroupv2 adoption is around the corner, as many popular distributions already come with cgroupv2 enabled by default.
The problem currently is with the fact, that the APM agent cannot detect that it is running on cgroupv2 based system, as it tries to parse the cgroup file which is fairly empty on a cgroupv2 enabled system. This causes the agent to specify "linux" as it's platform, omit container/pod ID's and cause multiple integrations to fail inside the Elastic ecosystem.
The current cgroup implementation uses the /proc/self/cgroup file to obtain relevant container and pod IDs. This file is empty on cgroupv2 based systems, and even in so called cgroupv1 systems, it's an undocumented "feature".
Currently there is no agreed upon method for obtaining this information from inside the container, and it's still a standing issue for the open container spec developers: opencontainers/runtime-spec#1105
My proposal is to use the workaround similar to here:
Hello!
Widespread cgroupv2 adoption is around the corner, as many popular distributions already come with cgroupv2 enabled by default.
The problem currently is with the fact, that the APM agent cannot detect that it is running on cgroupv2 based system, as it tries to parse the cgroup file which is fairly empty on a cgroupv2 enabled system. This causes the agent to specify "linux" as it's platform, omit container/pod ID's and cause multiple integrations to fail inside the Elastic ecosystem.
The current cgroup implementation uses the
/proc/self/cgroup
file to obtain relevant container and pod IDs. This file is empty on cgroupv2 based systems, and even in so called cgroupv1 systems, it's an undocumented "feature".Currently there is no agreed upon method for obtaining this information from inside the container, and it's still a standing issue for the open container spec developers: opencontainers/runtime-spec#1105
My proposal is to use the workaround similar to here:
The
/proc/self/mountinfo
file still contains references to necessary information (pod and container uid).We could use this until at least the standard is agreed upon, and could be switched out.
An example of the relevant information from my latest stable Flatcar Linux system, with Containerd, Kubernetes 1.24.7 and cgroupv2 enabled:
The problem which prevents me from working on this issue is that I do not know which formats these lines can take on different systems.
What are your ideas, would this method work?
The text was updated successfully, but these errors were encountered: