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

fix: handle double host prefix when Netdata running in a podman container #12380

Merged
merged 1 commit into from
Mar 14, 2022

Conversation

ilyam8
Copy link
Member

@ilyam8 ilyam8 commented Mar 11, 2022

Summary

Fixes: #12259

mountinfo_find_by_filesystem_super_option returns the path with /host in a podman container and without in a docker container.

$ podman exec nd cat /proc/self/mountinfo | grep cgroup
435 433 0:25 / /host/sys/fs/cgroup rw,nosuid,nodev,noexec,relatime - cgroup2 cgroup2 rw
447 427 0:25 / /sys/fs/cgroup ro,nosuid,nodev,noexec,relatime - cgroup2 cgroup2 rw

$ docker exec nd cat /proc/self/mountinfo | grep cgroup
302 301 0:25 / /sys/fs/cgroup ro,nosuid,nodev,noexec,relatime - cgroup2 cgroup rw
307 305 0:25 / /host/sys/fs/cgroup rw,nosuid,nodev,noexec,relatime - cgroup2 cgroup2 rw
Test Plan
  • cgroup v1 enabled; run Netdata podman/docker container, ensure Netdata can discover other containers.
  • cgroup v2 enabled; run Netdata podman/docker container, ensure Netdata can discover other containers.
Additional Information

@ilyam8 ilyam8 requested a review from vlvkobal as a code owner March 11, 2022 21:08
@ilyam8 ilyam8 requested a review from thiagoftsm March 11, 2022 21:09
@github-actions github-actions bot added the area/collectors Everything related to data collection label Mar 11, 2022
@surajnpn surajnpn merged commit 5da9b37 into netdata:master Mar 14, 2022
@ilyam8 ilyam8 deleted the fix_cgroup_double_host_prefix branch March 18, 2022 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/collectors Everything related to data collection
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: netdata_configured_host_prefix double /host
3 participants