datastax / cstar_perf

Apache Cassandra performance testing platform
Apache License 2.0
72 stars 34 forks source link

Dont pipe stderr in order to show real error #195

Closed nastra closed 8 years ago

nastra commented 8 years ago

This will show the real error happening when running cstar_perf inside a docker container

$ cstar_docker launch test_cluster 1 -m
INFO:cstar_docker:Launching a 2 node cluster with a separate client node ...
DEBUG:cstar_docker:docker run --ulimit memlock=100000000:100000000 --privileged --label cstar_node=true --label cluster_name=test_cluster --label cluster_type=cluster --label node=0  -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/bin/docker -d -m 2G --name=test_cluster_00  -h test_cluster_00 -v /home/automaton/git/cstar_perf:/home/cstar/git/cstar_perf datastax/cstar_docker
docker: invalid hostname format for --hostname: test_cluster_00.
See 'docker run --help'.
docker: "inspect" requires a minimum of 1 argument.
See 'docker inspect --help'.

Usage:  docker inspect [OPTIONS] CONTAINER|IMAGE [CONTAINER|IMAGE...]

Return low-level information on a container or image
Traceback (most recent call last):
  File "/home/automaton/git/cstar_perf/env/bin/cstar_docker", line 9, in <module>
    load_entry_point('cstar-perf.tool==1.0', 'console_scripts', 'cstar_docker')()
  File "/home/automaton/git/cstar_perf/tool/cstar_perf/docker/cstar_docker.py", line 816, in main
    execute_cmd(args.command, args)
  File "/home/automaton/git/cstar_perf/tool/cstar_perf/docker/cstar_docker.py", line 692, in execute_cmd
    client_double_duty=args.client_double_duty)
  File "/home/automaton/git/cstar_perf/tool/cstar_perf/docker/cstar_docker.py", line 360, in launch
    node_data[node_name] = get_container_data(container_id)
  File "/home/automaton/git/cstar_perf/tool/cstar_perf/docker/cstar_docker.py", line 208, in get_container_data
    return json.loads(p.communicate()[0])[0]
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
mshuler commented 8 years ago

Thanks!