Module: check_mk
Branch: master
Commit: 300f0eb90b993cdf0c6d8398fcaaa603661761c4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=300f0eb90b993c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Oct 12 15:42:36 2015 +0200
#2677 FIX Fixed duplicate Event Console reload in distributed setups
When activating WATO changes, Check_MK was trying to reload Event
Consoles running on remote sites twice which lead to errors like this:
Error: Internal automation error: Cannot
connect to event daemon via /omd/sites/AAA/tmp/run/mkeventd/status:
[Errno 104] Connection reset by peer
---
.werks/2677 | 14 ++++++++++++++
ChangeLog | 1 +
mkeventd/web/plugins/wato/mkeventd.py | 2 +-
web/htdocs/wato.py | 6 +-----
4 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/.werks/2677 b/.werks/2677
new file mode 100644
index 0000000..bcb3c82
--- /dev/null
+++ b/.werks/2677
@@ -0,0 +1,14 @@
+Title: Fixed duplicate Event Console reload in distributed setups
+Level: 1
+Component: ec
+Compatible: compat
+Version: 1.2.7i3
+Date: 1444657254
+Class: fix
+
+When activating WATO changes, Check_MK was trying to reload Event
+Consoles running on remote sites twice which lead to errors like this:
+
+Error: Internal automation error: Cannot
+connect to event daemon via /omd/sites/AAA/tmp/run/mkeventd/status:
+[Errno 104] Connection reset by peer
diff --git a/ChangeLog b/ChangeLog
index 6027ccf..14eb5c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -344,6 +344,7 @@
* 2644 FIX: Fix exception in executing actions or notifications when match groups
contain non-ASCII characters
* 2673 FIX: SNMP-Traps: Fixed translation of OIDs which are parts of trap values...
NOTE: Please refer to the migration notes!
+ * 2677 FIX: Fixed duplicate Event Console reload in distributed setups...
Livestatus:
* 2493 FIX: Fixed wrong JSON format when using stats queries together with header
columns...
diff --git a/mkeventd/web/plugins/wato/mkeventd.py
b/mkeventd/web/plugins/wato/mkeventd.py
index 56427b5..9f5287d 100644
--- a/mkeventd/web/plugins/wato/mkeventd.py
+++ b/mkeventd/web/plugins/wato/mkeventd.py
@@ -2908,5 +2908,5 @@ register_hook("pre-activate-changes",
mkeventd_update_notifiation_configuration)
# Only register the reload hook when mkeventd is enabled
if mkeventd_enabled:
- register_hook("activate-changes", lambda hosts: mkeventd_reload())
+ register_hook("activate-changes", lambda hosts: config.mkeventd_enabled and
mkeventd_reload())
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 5db482e..8ee74bf 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -12362,16 +12362,12 @@ def automation_push_snapshot():
create_distributed_wato_file(site_id, mode)
log_audit(None, "replication", _("Synchronized with master (my
site id is %s.)") % site_id)
- # Restart monitoring core, if neccessary
+ # Restart/reload monitoring core, if neccessary
if html.var("restart", "no") == "yes":
configuration_warnings =
check_mk_local_automation(config.wato_activation_method)
else:
configuration_warnings = []
- # Reload event console, if we have one
- if config.mkeventd_enabled:
- mkeventd_reload()
-
return configuration_warnings
except Exception, e:
if config.debug: