datadog-agent: Too many levels of symbolic links occur again in datadog-agent:6.11.0
Output of the info page (if this is a bug)
(Paste the output of the info page here)
Describe what happened:
CORE | WARN | (pkg/collector/py/datadog_agent.go:148 in LogMessage) | (disk.py:114) | Unable to get disk metrics for /host/proc/sys/fs/binfmt_misc: [Errno 40] Too many levels of symbolic links: '/host/proc/sys/fs/binfmt_misc'
Describe what you expected: No error
Steps to reproduce the issue:
Additional environment details (Operating System, Cloud provider, etc): docker inspect
...
"Mounts": [
{
"Type": "bind",
"Source": "/var/run/docker.sock",
"Destination": "/var/run/docker.sock",
"Mode": "ro",
"RW": false,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/sys/fs/cgroup",
"Destination": "/host/sys/fs/cgroup",
"Mode": "ro",
"RW": false,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/proc",
"Destination": "/host/proc",
"Mode": "ro",
"RW": false,
"Propagation": "rprivate"
},
]
...
amazonlinux - ami-0c57dafd95a102862
docker run -d -v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /proc/:/host/proc/:ro \
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
-p 127.0.0.1:8126:8126/tcp \
-e DD_API_KEY=<MY_API_KEY> \
-e DD_APM_ENABLED=true \
datadog/agent:latest
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 19
- Comments: 15 (3 by maintainers)
Thanks for sharing your tip @johnpekcan! I actually found another way to make it work:
I’m getting this error running the agent on Kubernetes. Surely there is a simple way to stop the agent from spamming the logs with this warning?
Hello and thanks for reporting this!
I’m able to reproduce this after the container instance boot when
systemd-binfmtis in an inactive/dead state.This service unit file comes with the following conditions:
Interestingly, by making sure one of these is met or by simply removing them, then restarting the service, the symlink recursion issue is gone.
The most viable approach is to ignore that mount point in the disk check by uncommenting these lines.
An example of passing check configuration to the agent with docker is detailed here.
Hope this helps!
Our workaround ending up being to explicitly mount the folder. So, we originally just had the mount
/proc/:/host/proc/:ro. So we then had to add/proc/sys/fs/binfmt_misc/:/host/proc/sys/fs/binfmt_misc/:roto get around the symlink issue.Is there a way to pass it as an ENV Variable? https://docs.datadoghq.com/agent/docker/?tab=standard#installation ?
Ooh, much more surgical! Thank you 😇
Hi @xlucas, I’m still seeing these warnings in my logs, and I’m not sure how to change the configuration for the docker agent. I’m using Convox, and I have this in my
convox.yml(which is similar todocker-compose.yml):How can I modify this config to remove these warnings:
Thanks!