skydive
skydive copied to clipboard
Docker topology probe fails if /proc directory doesn't contain a pid for each container
When skydive is run from within a container, the docker topology problem does not create the containers.
I ran skydive allinone from within a Docker container on Mac with --volume /var/run/docker.sock:/var/run/docker.sock
so that the Mac's Docker environment could be seen.
Although the Docker topology probe starts it silently fails because topology/probes/docker.go calls netns.GetFromPid(info.State.Pid) which returns an error if /proc/
The first problem is the return without logging if GetFromPid() fails. If we just log and continue if GetFromPid() fails, and also continue instead of returning when syscall.Stat() in topology/probes/netns.go:Register() fails, then the Docker problem works when skydive is run within a container.
I attempted to work around this. My attempt is was good because it doesn’t create the bridge or any of the usual stuff. It might be better to just have the system log the problem instead of silently failing.
The described bug also happens on Ubuntu WSL connecting to the windows docker desktop.