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

Error: Failed to find container network interface

mbsimonovic opened this issue · comments

Update: starting c3 fails, so that's why exec fails. Starting the container manually says: sh: 1: ping: not found :)

blockade up on the ping example, but ubuntu/xenial image, fails to start the c2 c3 (for idx, container in enumerate(self.config.sorted_containers): returns c1, c3, c2) container with the following error:


Error:
Failed to find container network interface:
exec 'cat /sys/class/net/eth0/ifindex' in container bc24ae2543d93423693820dfe01c5a47d11fe8fc3235386987ef4e2346434751 returned:
rpc error: code = 13 desc = invalid header field value "oci runtime error: exec failed: container_linux.go:247: starting container process caused \"process_linux.go:83: executing setns process caused \\\"exit status 16\\\"\"\n"

Ensure the container is alive and supports this exec command.

the c1 container seems to be running fine, ifindex is 4:

root@b262e87ac491:/# cat /sys/class/net/eth0/ifindex 
4

Btw is there a way to use pdb to debug the blockade without having to modify the cli.py file to add import pdb (can't use -m pdb, bcs need -m to run blockade.cli)?

All running in a vmware machine on a Mac:

$ python --version
Python 2.7.12

$ lsb_release  -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.1 LTS
Release:	16.04
Codename:	xenial
$ uname -a
Linux osboxes 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ 

Glad you figured this out. I improved these errors in 0.3.1, but it looks like they'd be even better if they included the blockade container name (c3 in this case). I've seen this frequently, where the container starts and stays alive long enough for the exec to start, but fails immediately after.

Regarding debugging, I'm not in the habit of using pdb. Is there a good way to tie it into cli.py, perhaps by checking an environment variable or CLI flag? Pull requests are welcome. :)

yeah, so what made it cryptic is that the container log was completely empty?! so I assumed that blockade failed not the container itself