projects
/
mirror
/
dsa-puppet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3d8cddc
)
Consider ourselves unhealthy if fetching from localhost fails
author
Tollef Fog Heen
<tfheen@err.no>
Sun, 1 Oct 2017 18:27:30 +0000
(20:27 +0200)
committer
Tollef Fog Heen
<tfheen@err.no>
Sun, 1 Oct 2017 18:28:12 +0000
(20:28 +0200)
modules/roles/files/mirror_health/mirror-health
patch
|
blob
|
history
diff --git
a/modules/roles/files/mirror_health/mirror-health
b/modules/roles/files/mirror_health/mirror-health
index
d3df95f
..
a4df165
100755
(executable)
--- a/
modules/roles/files/mirror_health/mirror-health
+++ b/
modules/roles/files/mirror_health/mirror-health
@@
-45,7
+45,10
@@
def check_uptodate():
latest_ts = max(latest_ts, lm)
except (requests.exceptions.ProxyError, requests.exceptions.ReadTimeout):
pass
latest_ts = max(latest_ts, lm)
except (requests.exceptions.ProxyError, requests.exceptions.ReadTimeout):
pass
- local_lm = last_modified(retrieve_from_host('localhost', URL))
+ try:
+ local_lm = last_modified(retrieve_from_host('localhost', URL))
+ except (requests.exceptions.ProxyError, requests.exceptions.ReadTimeout):
+ return False
logging.debug("lm for localhost: %s", local_lm)
if local_lm < latest_ts:
logging.info("considering myself unhealthy my ts=%s latest_ts=%s", local_lm, latest_ts)
logging.debug("lm for localhost: %s", local_lm)
if local_lm < latest_ts:
logging.info("considering myself unhealthy my ts=%s latest_ts=%s", local_lm, latest_ts)