From: Tollef Fog Heen Date: Thu, 1 Feb 2018 13:31:41 +0000 (+0100) Subject: Try harder at handling connection timeouts for mirror-health X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=7f3bdf0354318e302a7e849e6c722f8759277179;p=mirror%2Fdsa-puppet.git Try harder at handling connection timeouts for mirror-health --- 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: