benchmark-wrapper
benchmark-wrapper copied to clipboard
[uperf] Indexing issue causes result output not to be displayed.
Here is an example :
<?xml version=1.0?>
<profile name="stream-udp-16384-8">
<group nthreads="8">
<transaction iterations="1">
<flowop type="connect" options="remotehost=$h protocol=udp"/>
</transaction>
<transaction duration="60">
<flowop type=write options="count=16 size=16384"/>
</transaction>
<transaction iterations="1">
<flowop type=disconnect />
</transaction>
</group>
</profile>
Traceback (most recent call last):
File "/opt/snafu/uperf-wrapper/uperf-wrapper.py", line 227, in <module>
sys.exit(main())
File "/opt/snafu/uperf-wrapper/uperf-wrapper.py", line 221, in main
_index_result("ripsaw-uperf-results",server,port,documents)
File "/opt/snafu/uperf-wrapper/uperf-wrapper.py", line 27, in _index_result
es.index(index=index, body=result)
File "/usr/lib/python2.7/site-packages/elasticsearch/client/utils.py", line 84, in _wrapped
return func(*args, params=params, **kwargs)
File "/usr/lib/python2.7/site-packages/elasticsearch/client/__init__.py", line 364, in index
"POST", _make_path(index, doc_type, id), params=params, body=body
File "/usr/lib/python2.7/site-packages/elasticsearch/transport.py", line 353, in perform_request
timeout=timeout,
File "/usr/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 244, in perform_request
raise ConnectionError("N/A", str(e), e)
elasticsearch.exceptions.ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7fc7b1822e90>: Failed to establish a new connection: [Errno -2] Name or service not known) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7fc7b1822e90>: Failed to establish a new connection: [Errno -2] Name or service not known)
We should catch this error, report a connection failure to the user, but still present the results.