python-swiftclient should retry at least *some* SSLErrors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-swiftclient |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Currently, our retry logic special-cases SSLErrors to fail quickly: https:/
Presumably we did this because if we get back an error about certificate verification (cert expired, cert self-signed), there's no point in retrying -- we expect the same result. However, there are other sorts of errors that might come up; for example,
Traceback (most recent call last):
File "/usr/lib/
httplib_
File "/usr/lib/
self.
File "/usr/lib/
conn.connect()
File "/usr/lib/
self.sock = ssl_wrap_socket(
File "/usr/lib/
ssl_sock = _ssl_wrap_
File "/usr/lib/
return ssl_context.
File "/usr/lib/
return self.sslsocket_
File "/usr/lib/
self.
File "/usr/lib/
self.
ssl.SSLZeroRetu
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/
resp = conn.urlopen(
File "/usr/lib/
retries = retries.increment(
File "/usr/lib/
raise MaxRetryError(
urllib3.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/
headers, body = conn.get_
File "/usr/lib/
rheaders, body = self._retry(None, get_object, container, obj,
File "/usr/lib/
rv = func(self.url, self.token, *args,
File "/usr/lib/
conn.
File "/usr/lib/
self.resp = self._request(
File "/usr/lib/
return self.request_
File "/usr/lib/
resp = self.send(prep, **send_kwargs)
File "/usr/lib/
r = adapter.
File "/usr/lib/
raise SSLError(e, request=request)
requests.
Note that this is a particularly disingenuous error message: despite saying "Max retries exceeded" and using our default --retries=5, not one attempt has been made to retry!
Ugh. Likely duplicate from 2016 (!): https:/ /bugs.launchpad .net/python- swiftclient/ +bug/1641363