Module: check_mk
Branch: master
Commit: 80d46419c960b41ba994b74255e9c7645a9ae532
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=80d46419c960b4…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Jul 17 11:00:06 2015 +0200
#2407 FIX WATO master/slave replication: fixed problem where the configuration from the
master site was not activate on slave site
Changes made on a distributed WATO slave site could delay a configuration update attempt
from the master.
Detailed information: Any changes on a slave site which lead to a pending log entry
triggered the cmcrushd.
The cmcrushd creates a configuration for the microcore, which takes precendence over
creating the configuration anew.
When a snapshot got pushed from the master site, the slave site thought that there is
already a precompiled configuration
available and used the cmcrushd configuration.
This problem is automatically resolved on the following configuration push from the
master,
because the cmcrushd configuration is only used once.
---
.werks/2407 | 18 ++++++++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 7 ++++++-
3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/.werks/2407 b/.werks/2407
new file mode 100644
index 0000000..00d3674
--- /dev/null
+++ b/.werks/2407
@@ -0,0 +1,18 @@
+Title: WATO master/slave replication: fixed problem where the configuration from the
master site was not activate on slave site
+Level: 2
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1437116656
+
+Changes made on a distributed WATO slave site could delay a configuration update attempt
from the master.
+
+Detailed information: Any changes on a slave site which lead to a pending log entry
triggered the cmcrushd.
+The cmcrushd creates a configuration for the microcore, which takes precendence over
creating the configuration anew.
+When a snapshot got pushed from the master site, the slave site thought that there is
already a precompiled configuration
+available and used the cmcrushd configuration.
+
+This problem is automatically resolved on the following configuration push from the
master,
+because the cmcrushd configuration is only used once.
diff --git a/ChangeLog b/ChangeLog
index bf7dd49..4f4bed8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -95,6 +95,7 @@
* 2464 FIX: UDP ports for SNMP communication can now be configured via WATO
* 2466 FIX: Fixed exception when searching for rulesets / global settings using
special characters like umlauts
* 2467 FIX: Fixed encoding exception occuring in localized GUI when a WATO action
triggers an error message...
+ * 2407 FIX: WATO master/slave replication: fixed problem where the configuration from
the master site was not activate on slave site...
Notifications:
* 2313 FIX: notification bulking: fixed exception for plugins which are not
configured with checkboxes, e.g. sms
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index a202509..02e0142 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -5119,7 +5119,9 @@ def log_pending(status, linkinfo, what, message, user_id = None):
if 'need_to_bake_agents' in globals():
need_to_bake_agents()
- if not is_distributed():
+ # The latter one condition applies to slave sites
+ # Otherwise slave sites would trigger the cmcrushd
+ if not is_distributed() and not has_distributed_wato_file():
if status != SYNC:
log_entry(linkinfo, what, message, "pending.log", user_id)
cmc_rush_ahead()
@@ -11999,6 +12001,9 @@ def delete_distributed_wato_file():
if os.path.exists(p):
create_user_file(p, "w").write("")
+def has_distributed_wato_file():
+ return os.path.exists(defaults.check_mk_configdir +
"/distributed_wato.mk")
+
#.
# .--Users/Contacts------------------------------------------------------.
# | _ _ ______ _ _ |