From: Tollef Fog Heen Date: Sat, 30 Sep 2017 20:05:55 +0000 (+0200) Subject: Fix logic in healthy/unhealthy X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=b778bf45ae54ad750c167847ee8bac0182d7a9ed;p=mirror%2Fdsa-puppet.git Fix logic in healthy/unhealthy --- diff --git a/modules/roles/files/mirror_health/mirror-health b/modules/roles/files/mirror_health/mirror-health index c2ef59010..62148828f 100755 --- a/modules/roles/files/mirror_health/mirror-health +++ b/modules/roles/files/mirror_health/mirror-health @@ -37,8 +37,8 @@ while True: if lm > latest_ts: latest_ts = lm local_lm = last_modified(retrieve_from_host('localhost', URL)) - logging.debug("lm for localhost: %s", lm) - if latest_ts <= local_lm: + logging.debug("lm for localhost: %s", local_lm) + if local_lm < latest_ts: try: logging.info("considering myself unhealthy my ts=%s latest_ts=%s", local_lm, latest_ts) os.remove(HEALTH_FILE)