Module: check_mk
Branch: master
Commit: b839005c5ce7e1e105218688d6dd7395fc46e1a2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b839005c5ce7e1…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jun 1 12:15:25 2016 +0200
3616 FIX Fix cmk -I ignoring the option --cache
When you use <tt>cmk --cache -I myhost123<tt> on the command line in order
to discovery services on a specific host then the option <tt>--cache</tt> was
ignored
and always fresh data had been fetched from the target host. This has been
fixed.
---
.werks/3616 | 13 +++++++++++++
ChangeLog | 1 +
modules/discovery.py | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/3616 b/.werks/3616
new file mode 100644
index 0000000..166647b
--- /dev/null
+++ b/.werks/3616
@@ -0,0 +1,13 @@
+Title: Fix cmk -I ignoring the option --cache
+Level: 2
+Component: core
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1464776061
+
+When you use <tt>cmk --cache -I myhost123<tt> on the command line in order
+to discovery services on a specific host then the option <tt>--cache</tt> was
ignored
+and always fresh data had been fetched from the target host. This has been
+fixed.
diff --git a/ChangeLog b/ChangeLog
index 6bf595a..2eb7e44 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,7 @@
* 3416 FIX: Avoid warning in cmc.log when rescheduling non-existing discovery
check...
* 3437 FIX: Improved performance of "activate changes", especially in
distributed environments
* 3471 FIX: Repair ignoring discovery errors when bogus %s is contained in service
description...
+ * 3616 FIX: Fix cmk -I ignoring the option --cache...
Checks & Agents:
* 3183 aruba_wlc_aps: new check which monitors the provisioned accesspoints of an
Aruba Network WLAN Controller
diff --git a/modules/discovery.py b/modules/discovery.py
index 1001eaa..efbd8b8 100644
--- a/modules/discovery.py
+++ b/modules/discovery.py
@@ -43,7 +43,7 @@ import cmk.tty as tty
# hostnames is already prepared by the main code. If it is
# empty then we use all hosts and switch to using cache files.
def do_discovery(hostnames, check_types, only_new):
- use_caches = False
+ use_caches = opt_use_cachefile
if not hostnames:
verbose("Discovering services on all hosts:\n")
hostnames = all_active_realhosts()