worstcase / blockade

Docker-based utility for testing network failures and partitions in distributed applications
http://blockade.readthedocs.org
Apache License 2.0
907 stars 72 forks source link

blockade logs throwing errors #9

Closed yanfali closed 9 years ago

yanfali commented 9 years ago

as in issue #8 when running blockade logs c2 I'm seeing unexpected errors

# blockade logs c1

Unexpected error! This may be a Blockade bug.

Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/blockade/cli.py", line 242, in main
    opts.func(opts)
  File "/usr/lib/python3.4/site-packages/blockade/cli.py", line 195, in cmd_logs
    puts(b.logs(opts.container))
  File "/usr/lib/python3.4/site-packages/clint/textui/core.py", line 57, in puts
    s = tsplit(s, NEWLINES)
  File "/usr/lib/python3.4/site-packages/clint/utils.py", line 69, in tsplit
    string = string.replace(i, final_delimiter)
TypeError: expected bytes, bytearray or buffer compatible object

blockade status

# blockade status
NODE            CONTAINER ID    STATUS  IP              NETWORK    PARTITION
c1              41c9647701aa    UP      172.17.0.8      NORMAL
c2              278fab07acff    UP      172.17.0.10     NORMAL
c3              cbb51d715248    UP      172.17.0.9      NORMAL

If I use docker logs # docker logs 278fab07acff

PING 172.17.0.8 (172.17.0.8) 56(84) bytes of data.
64 bytes from 172.17.0.8: icmp_seq=1 ttl=64 time=0.126 ms
64 bytes from 172.17.0.8: icmp_seq=2 ttl=64 time=0.073 ms
64 bytes from 172.17.0.8: icmp_seq=3 ttl=64 time=0.055 ms
64 bytes from 172.17.0.8: icmp_seq=4 ttl=64 time=0.050 ms
64 bytes from 172.17.0.8: icmp_seq=5 ttl=64 time=0.051 ms
64 bytes from 172.17.0.8: icmp_seq=6 ttl=64 time=0.051 ms
64 bytes from 172.17.0.8: icmp_seq=7 ttl=64 time=0.050 ms
64 bytes from 172.17.0.8: icmp_seq=8 ttl=64 time=0.057 ms

Seems to work just fine.

Let me know if you need more info.

labisso commented 9 years ago

Thanks for the report! This was a python3 issue. The fix is in master now and a new release should be out soon.

yanfali commented 9 years ago

@labisso thanks very much for fixing this!