Merge "Prevent Kuryr restart due to connection issue"
This commit is contained in:
commit
d81c083430
|
@ -13,6 +13,10 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from requests import exceptions as requests_exc
|
||||
|
||||
from keystoneauth1 import exceptions as key_exc
|
||||
|
||||
from kuryr_kubernetes import exceptions
|
||||
from kuryr_kubernetes.handlers import asynchronous as h_async
|
||||
from kuryr_kubernetes.handlers import dispatch as h_dis
|
||||
|
@ -55,7 +59,10 @@ class ControllerPipeline(h_dis.EventPipeline):
|
|||
def _wrap_consumer(self, consumer):
|
||||
# TODO(ivc): tune retry interval/timeout
|
||||
return h_log.LogExceptions(h_retry.Retry(
|
||||
consumer, exceptions=exceptions.ResourceNotReady))
|
||||
consumer, exceptions=(
|
||||
exceptions.ResourceNotReady,
|
||||
key_exc.connection.ConnectFailure,
|
||||
requests_exc.ConnectionError)))
|
||||
|
||||
def _wrap_dispatcher(self, dispatcher):
|
||||
return h_log.LogExceptions(h_async.Async(dispatcher, self._tg,
|
||||
|
|
Loading…
Reference in New Issue