Browse Source

Merge "Prevent Kuryr restart due to connection issue"

changes/22/695722/1
Zuul 2 weeks ago
parent
commit
d81c083430
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      kuryr_kubernetes/controller/handlers/pipeline.py

+ 8
- 1
kuryr_kubernetes/controller/handlers/pipeline.py View File

@@ -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…
Cancel
Save