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 running the documentation example.

thebithead opened this issue · comments

I can manually "run" other docker images, but I can't seem to get the documentation example to work:

{noformat}
tgates@tgW530 ~/myrepo/docker/blockade_test $ sudo blockade up

Unexpected error! This may be a Blockade bug.

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/blockade/cli.py", line 242, in main
opts.func(opts)
File "/usr/local/lib/python2.7/dist-packages/blockade/cli.py", line 109, in cmd_up
containers = b.create()
File "/usr/local/lib/python2.7/dist-packages/blockade/core.py", line 47, in create
veth_device)
File "/usr/local/lib/python2.7/dist-packages/blockade/core.py", line 69, in _start_container
binds=container.volumes, port_bindings=container.publish_ports)
File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 940, in start
self._raise_for_status(res)
File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 94, in _raise_for_status
raise errors.APIError(e, response, explanation=explanation)
APIError: 500 Server Error: Internal Server Error ("Cannot start container 173e5872f98475ff28d0166b6986eb17814c32f610d1502b7b12b0f2718eab39: Cannot link to a non running container: /blockade-a760658c32-c1 AS /blockade-a760658c32-c3/c1")
tgates@tgW530 ~/myrepo/docker/blockade_test $ cat blockade.yml
containers:
c1:
image: ubuntu
command: /bin/sleep 300000
ports: [10000]

c2:
image: ubuntu
command: sh -c "ping $C1_PORT_10000_TCP_ADDR"
links: ["c1"]

c3:
image: ubuntu
command: sh -c "ping $C1_PORT_10000_TCP_ADDR"
links: ["c1"]
tgates@tgW530 ~/myrepo/docker/blockade_test $ docker info
Containers: 12
Images: 118
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 142
Dirperm1 Supported: true
Execution Driver: lxc-1.0.7
Logging Driver: json-file
Kernel Version: 3.16.0-38-generic
Operating System: Ubuntu 14.04.2 LTS
CPUs: 8
Total Memory: 31.07 GiB
Name: tgW530
ID: TRJG:DCFY:3I2C:EJMT:PGJJ:ZQYW:AVIU:42PN:B4PJ:GCP4:A5R6:QPB2
WARNING: No swap limit support
tgates@tgW530 ~/myrepo/docker/blockade_test $
{noformat}

What does docker version say? Does docker logs on the c1 container id say anything interesting? What happens if you docker start it manually?

tgates@tgW530 ~/installer-testing $ docker ps -a|head
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
173e5872f984 ubuntu "sh -c 'ping $C1_PORT" 17 hours ago Created blockade-a760658c32-c3
ac0327ee0ff5 ubuntu "/bin/sleep 300000" 17 hours ago Exited (1) 17 hours ago blockade-a760658c32-c1
tgates@tgW530 ~/installer-testing $ docker version
Client:
Version: 1.8.1
API version: 1.20
Go version: go1.4.2
Git commit: d12ea79
Built: Thu Aug 13 02:35:49 UTC 2015
OS/Arch: linux/amd64

Server:
Version: 1.8.1
API version: 1.20
Go version: go1.4.2
Git commit: d12ea79
Built: Thu Aug 13 02:35:49 UTC 2015
OS/Arch: linux/amd64
tgates@tgW530 ~/installer-testing $ docker logs blockade-a760658c32-c1
tgates@tgW530 ~/installer-testing $ docker start blockade-a760658c32-c1
blockade-a760658c32-c1
tgates@tgW530 ~/installer-testing $ docker ps -a|head
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
173e5872f984 ubuntu "sh -c 'ping $C1_PORT" 17 hours ago Created blockade-a760658c32-c3
ac0327ee0ff5 ubuntu "/bin/sleep 300000" 17 hours ago Exited (1) 12 seconds ago blockade-a760658c32-c1

@thebithead I think the readme mentions that docker versions newer than 1.6.2 arent supported. and you are on 1.8.1.

Would love to see a fix for newer versions of docker.

Closing this one as a duplicate of #14 -- the fix for which is coming shortly.