Module: check_mk
Branch: master
Commit: ebbd2aa8d86d3c25ce6428561f60a6d1d6e1c2c4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ebbd2aa8d86d3c…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Oct 30 15:33:11 2018 +0100
6673 FIX Checks from mkps did not always replace existing checks
Check_MK precompiles check plugins, so that they can be faster reused later on.
The mechanism which detects if a plugin needs to be precompiled again, missed the fact
that files extracted from mkps may have an older timestamp than the precompiled one.
This also applies to old check files which are moved into the local checks dir.
Change-Id: I86cba177aca54f5273201300a3e1e5b21dcc35af
---
.werks/6673 | 14 ++++++++++++++
cmk_base/config.py | 3 ++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/.werks/6673 b/.werks/6673
new file mode 100644
index 0000000..74e6358
--- /dev/null
+++ b/.werks/6673
@@ -0,0 +1,14 @@
+Title: Checks from mkps did not always replace existing checks
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1540909691
+Class: fix
+
+Check_MK precompiles check plugins, so that they can be faster reused later on.
+The mechanism which detects if a plugin needs to be precompiled again, missed the fact
+that files extracted from mkps may have an older timestamp than the precompiled one.
+This also applies to old check files which are moved into the local checks dir.
+
diff --git a/cmk_base/config.py b/cmk_base/config.py
index fdb3d88..7f289be 100644
--- a/cmk_base/config.py
+++ b/cmk_base/config.py
@@ -2492,7 +2492,8 @@ def _is_plugin_precompiled(path, precompiled_path):
except struct.error:
return False
- if long(os.stat(path).st_mtime) > origin_file_mtime:
+
+ if long(os.stat(path).st_mtime) != origin_file_mtime:
return False
return True