From 7f3bdf0354318e302a7e849e6c722f8759277179 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Thu, 1 Feb 2018 14:31:41 +0100 Subject: [PATCH] Try harder at handling connection timeouts for mirror-health --- modules/roles/files/mirror_health/mirror-health | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/roles/files/mirror_health/mirror-health b/modules/roles/files/mirror_health/mirror-health index c3606de00..2c582f25a 100755 --- a/modules/roles/files/mirror_health/mirror-health +++ b/modules/roles/files/mirror_health/mirror-health @@ -48,11 +48,11 @@ def check_uptodate(): logging.debug("lm for host %s: %s", host, lm) if healthy(retrieve_from_host(host, HEALTH_CHECK_URL)): latest_ts = max(latest_ts, lm) - except (requests.exceptions.ProxyError, requests.exceptions.ReadTimeout, requests.exceptions.ConnectTimeout): + except (requests.exceptions.ProxyError, requests.exceptions.ReadTimeout, requests.exceptions.ConnectTimeout, requests.exceptions.ConnectionError): pass try: local_lm = last_modified(retrieve_from_host('localhost', URL)) - except (requests.exceptions.ProxyError, requests.exceptions.ReadTimeout, requests.exceptions.ConnectTimeout): + except (requests.exceptions.ProxyError, requests.exceptions.ReadTimeout, requests.exceptions.ConnectTimeout, requests.exceptions.ConnectionError): return False logging.debug("lm for localhost: %s", local_lm) if local_lm < latest_ts: -- 2.20.1