Module: check_mk
Branch: master
Commit: 6bcc6712aeadcb539cd069455035bdcbad5a28d9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6bcc6712aeadcb…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Oct 14 19:33:15 2013 +0200
FIX: avoid invalid cache of 2nd and up hosts in bulk inventory
---
ChangeLog | 1 +
modules/automation.py | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 984e442..332de69 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
* FIX: avoid exception nodes of cluster have different agent type
* FIX: continue inventory, if one check does not support it
* FIX: fix configuration of explicit SNMP community, allow unicode
+ * FIX: avoid invalid cache of 2nd and up hosts in bulk inventory
Multisite:
* Speed-O-Meter: now measure only service checks. Host checks
diff --git a/modules/automation.py b/modules/automation.py
index 4ddda88..f9b7034 100644
--- a/modules/automation.py
+++ b/modules/automation.py
@@ -308,6 +308,11 @@ def automation_try_inventory_node(hostname, leave_no_tcp=False):
global g_service_description
g_service_description = descr
infotype = ct.split('.')[0]
+
+ # Sorry. The whole caching stuff is the most horrible hack in
+ # whole Check_MK. Nobody dares to clean it up, YET. But that
+ # day is getting nearer...
+ old_opt_use_cachefile = opt_use_cachefile
opt_use_cachefile = True
if not leave_no_tcp:
opt_no_tcp = True
@@ -340,6 +345,8 @@ def automation_try_inventory_node(hostname, leave_no_tcp=False):
else:
tcp_error = output
+ opt_use_cachefile = old_opt_use_cachefile
+
if exitcode == None:
check_function = check_info[ct]["check_function"]
if state_type != 'manual':