Previously we'd get tracebacks like this during a proxy reload:
Traceback (most recent call last):
File ".../urllib3/connectionpool.py", line 791, in urlopen
response = self._make_request(
File ".../urllib3/connectionpool.py", line 537, in _make_request
response = conn.getresponse()
File ".../urllib3/connection.py", line 461, in getresponse
httplib_response = super().getresponse()
File ".../http/client.py", line 1375, in getresponse
response.begin()
File ".../http/client.py", line 318, in begin
version, status, reason = self._read_status()
File ".../http/client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ".../requests/adapters.py", line 486, in send
resp = conn.urlopen(
File ".../urllib3/connectionpool.py", line 845, in urlopen
retries = retries.increment(
File ".../urllib3/util/retry.py", line 470, in increment
raise reraise(type(error), error, _stacktrace)
File ".../urllib3/util/util.py", line 38, in reraise
raise value.with_traceback(tb)
File ".../urllib3/connectionpool.py", line 791, in urlopen
response = self._make_request(
File ".../urllib3/connectionpool.py", line 537, in _make_request
response = conn.getresponse()
File ".../urllib3/connection.py", line 461, in getresponse
httplib_response = super().getresponse()
File ".../http/client.py", line 1375, in getresponse
response.begin()
File ".../http/client.py", line 318, in begin
version, status, reason = self._read_status()
File ".../http/client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ".../eventlet/greenpool.py", line 88, in _spawn_n_impl
func(*args, **kwargs)
File ".../swiftbench/bench.py", line 477, in _run
client.get_object(self.url, self.token,
File ".../swiftclient/client.py", line 1252, in get_object
conn.request(method, path, '', headers)
File ".../swiftclient/client.py", line 416, in request
self.resp = self._request(method, url, headers=headers, data=data,
File ".../swiftclient/client.py", line 400, in _request
return self.request_session.request(*arg, **kwarg)
File ".../requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File ".../requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File ".../requests/adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
Change-Id: Idd1a83afd2c4dbf7305c19d3ec3974961e500620
The test infrastructure for swiftbench is pretty bad. In order to start
cleaning it up this patch starts with some initial scaffolding for
test_cli.py. Sd such it refactors the code out of bin/swiftbench and
puts it into swiftbench/cli/__init__.py. Leaving the cli namespace free
for future expansions.
A very basic tests/test_cli.py has been added which initialises some test
scaffolding. Additionally, fix some bugs this uncovered:
- The --delete-concurrency option now actually has an effect.
- Stop mutating global state on every run.
Partial-Bug: #1263290
Change-Id: Ibb2c3bb17522b6302697e2d2b01df3a6aa62800e
As per the comment#12 in [1], the if loop can be removed
and json can be directly imported from bench.py
[1]: https://review.openstack.org/#/c/264486/
TrivialFix
Depends-On:I7c8a1a39f0e86cbd38466c2dcd611a8f513c8adc
Change-Id: I519753b0db0d8eee70c84afa92dfab2b943afbac
swift-bench test results could be altered when using HTTP proxy server.
This patch add warning when HTTP proxy has been detected.
Change-Id: Id818203345914efee37852e96541c259de6ae555
provide ability for user to select which storage policy
to run benchmark against
Change-Id: I9973f964ec3989281f47f853be053498e7a6e51e
Signed-off-by: Thiago da Silva <thiago@redhat.com>
next(iterable) is supposed to return the next thing in the sequence;
here, that's a bunch of zeros. However, this was returning a generator
that yielded one item: a bunch of zeros. This broke direct
benchmarking.
Change-Id: I2fca4795fc9b3d1637c72616a52a60482d6e853e
Remove the dependence on swift, import the only needed functions from
swift.common.utils to swiftbench.utils
Add tests for utils using mock instead.
Change-Id: I1b69dce750b55f3ee0e999fb5a7100cf811f7ebe
- Update .gitignore to ignore all testrunners.
- Move swift-bench to swiftbench.
- Move tests to tests/
- Add some simple {test-,}requirements (more works needs to be done to get proper versioning)
Change-Id: Iab4d65f02cbce8c99ecafa30d15c4cb11f0b4293