Add urllib3's SSLError to expected Watcher exc
Seems like new requests lib is somehow raising urllib3.exceptions.SSLError more often. This commit adds it to the exceptions expected by the Watcher and silenced with a retry. Closes-Bug: 1906498 Change-Id: I214c08c197483c00a5caecc47ef117cdd07a7652
This commit is contained in:
parent
0bd8285b71
commit
f5e8e9c3b0
|
@ -19,6 +19,7 @@ import os
|
||||||
import ssl
|
import ssl
|
||||||
import time
|
import time
|
||||||
from urllib import parse
|
from urllib import parse
|
||||||
|
import urllib3
|
||||||
|
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
|
@ -396,7 +397,8 @@ class K8sClient(object):
|
||||||
m = line_dict.get('object', {}).get('metadata', {})
|
m = line_dict.get('object', {}).get('metadata', {})
|
||||||
resource_version = m.get('resourceVersion', None)
|
resource_version = m.get('resourceVersion', None)
|
||||||
except (requests.ReadTimeout, requests.ConnectionError,
|
except (requests.ReadTimeout, requests.ConnectionError,
|
||||||
ssl.SSLError, requests.exceptions.ChunkedEncodingError):
|
ssl.SSLError, requests.exceptions.ChunkedEncodingError,
|
||||||
|
urllib3.exceptions.SSLError):
|
||||||
t = utils.exponential_backoff(attempt)
|
t = utils.exponential_backoff(attempt)
|
||||||
log = LOG.debug
|
log = LOG.debug
|
||||||
if attempt > 0:
|
if attempt > 0:
|
||||||
|
|
Loading…
Reference in New Issue