Module: check_mk
Branch: master
Commit: 7d4dca557c0bc66a4eace76d7a7db22ed9b399e3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7d4dca557c0bc6…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Oct 9 20:23:49 2013 +0200
FIX: liveproxyd: honor wait time after failed connect
---
ChangeLog | 4 ++++
doc/treasures/liveproxy/liveproxyd | 3 +++
web/htdocs/wato.py | 2 +-
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 2d238bd..2d7daf9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,6 +29,10 @@
* FIX: avoid duplicate output of log message in log tables
* FIX: fixed problem with ldap userid encoding
+ Livestatus-Proxy:
+ * FIX: fix exception when printing error message
+ * FIX: honor wait time (now called cooling period) after failed TCP connection
+
WATO:
* Rule "State and count of processes": New configuration options:
virtual and resident memory levels
diff --git a/doc/treasures/liveproxy/liveproxyd b/doc/treasures/liveproxy/liveproxyd
index 2a7fe33..11c857c 100755
--- a/doc/treasures/liveproxy/liveproxyd
+++ b/doc/treasures/liveproxy/liveproxyd
@@ -108,6 +108,7 @@ def initiate_connections():
s.connect(siteconf["socket"])
except socket.error, e:
if e.errno != 115: # "Operation now in progress"
+ sitestate["last_failed_connect"] = time.time()
if opt_debug:
raise
else:
@@ -115,6 +116,7 @@ def initiate_connections():
break
except Exception, e:
+ sitestate["last_failed_connect"] = time.time()
if opt_debug:
raise
log("Error: cannot create TCP channel to %s:%d: %s" %
(siteconf["socket"] + (e,)))
@@ -135,6 +137,7 @@ def do_heartbeats():
if age >= timeout:
log("Heartbeat timeout after %.1f sec on channel %s/%d" %
(
age, sitename, channel["socket"].fileno()))
+ sitestate["last_failed_connect"] = now
disconnect_from_site(sitename)
else:
if now - since >= rate:
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 61992b4..744d1ee 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -6890,7 +6890,7 @@ def mode_edit_site(phase):
),
( "connect_retry",
Float(
- title = _("Wait time after failed connect"),
+ title = _("Cooling period after failed
connect/heartbeat"),
minvalue = 0.1,
unit = _("sec"),
default_value = 4.0,