worstcase / blockade

Docker-based utility for testing network failures and partitions in distributed applications

Home Page:http://blockade.readthedocs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem determining host network device

joshbenner opened this issue · comments

I am frequently encountering this error for no apparent reason:

Error:
Problem determining host network device for container '157795997a89682870860bb97f4f18383c9b7b4112b4be4cf047f1d8e4db217c'

Can you help me understand what causes this, and how I might resolve it?

I haven't seen that error before, but it can come from a few conditions in this method: https://github.com/dcm-oss/blockade/blob/6c79655d6550962c5385becb053270a520a93202/blockade/net.py#L67-L96

This method attempts to find the network interface device name for a container, and this is an area that has changed a few times, with different docker releases and container drivers. There must be some case we are not handling. Can you please provide:

  • the output of docker version
  • then launch a container (of the image you are using with blockade), and provide the output of the following two commands (substituting in your container ID):
    • docker exec $CONTAINER_ID ip link show eth0
    • ip link

It seems the issue is that if there is anything that causes the container to hit an error on run, this is the error that manifests. In my case, I had a typo in the volume I was attempting to mount.

So I think the problem here is that the error is misleading; or rather, some set of problems leading up to this point are not caught.

Interesting.. I'm surprised the run didn't fail earlier. I agree the error messages need to be better for this case. I'll keep this issue open as a reminder to address that.

Thanks for reporting this!

A note, Ubuntu images don't seem to have the ip command available anymore. I tried with ubuntu:16:04. Use ubuntu:14.04.

Closing this issue. In 0.3.1, blockade has a couple of fixes that address problems discussed here:

  1. Vastly improved error handling around finding a container's interface
  2. ip is no longer required to be installed in containers. Instead Blockade directly reads the /sys FS to find the needed information from the container.