-
Notifications
You must be signed in to change notification settings - Fork 40
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
Docker-tc fails with multiple containers in same network #2
Comments
@lukaszlach I believe I already have a fix for it and I have already forked the repo. I'll try to fix it myself and if you like the solution I can make a pull request ;) |
Confirmed. If multiple docker containers are connected to the same bridge network, then the current workflow will fail to work. Docker Container → Docker Network ID → Linux Network Interface For a single bridge network, each container that links to it will have a veth interface. So the bash script will return multiple items for NETWORK_INTERFACE_NAME. |
It seems that matching Docker Container ID with veth is not that trivial. There are some open-sourced scripts doing this: https://github.com/micahculpepper/dockerveth. |
I have a fix for it already in my fork. I just need to get my branch and commits cleaned up and I'll make a pull request ;) |
Thank you. I saw your implementation. But https://github.com/micahculpepper/dockerveth points out:
I wish that I could make the leap from container ID to veth ID without provoking |
Hello folks, I am interested in using this tool too and was wondering if there was a chance for a release with the fix @Silcet? Thanks :) |
@Lawouach I just need to clean my commits to make a branch for the pull request. I'll try to get it done today. Sorry for the wait ;) |
No worries. Always appreciated to have feedback :) |
Awesome. Your branch seems to be working just fine @Silcet! |
Can I ask you to confirm that the #5 just merged resolves this issue? |
When a new container is started, docker-tc finds out the network device of the container without any issue and everything works. When a second container is started in the same network, the docker_network_get_interface() function returns both network devices separated by a space. This return value makes any other function that tries to use it fail.
Test with 2 busybox containers pinging google.com:
The text was updated successfully, but these errors were encountered: