Regression in 1.5.0b5)
Message-ID: <5b06d83a.K1UoKjPdZtafvRDU%lm(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 596a4bc179125c8613fa2205e998dc386cdeb491
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=596a4bc179125c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu May 24 14:42:17 2018 +0200
6153 FIX Fixed broken notifications and alert handling (Regression in 1.5.0b5)
The notifications and alert handling were not working correctly at all. Better
use the 1.5.0b5 only in test environments where you don't need these features.
Change-Id: I3885b8770e47cb91d4d2759a88077756485f4b25
---
.werks/6153 | 12 ++++++++++++
cmk_base/modes/check_mk.py | 6 +++++-
cmk_base/notify.py | 3 ---
3 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/.werks/6153 b/.werks/6153
new file mode 100644
index 0000000..d55cf67
--- /dev/null
+++ b/.werks/6153
@@ -0,0 +1,12 @@
+Title: Fixed broken notifications and alert handling (Regression in 1.5.0b5)
+Level: 2
+Component: notifications
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1527165633
+
+The notifications and alert handling were not working correctly at all. Better
+use the 1.5.0b5 only in test environments where you don't need these features.
diff --git a/cmk_base/modes/check_mk.py b/cmk_base/modes/check_mk.py
index 4e499ee..c043a6b 100644
--- a/cmk_base/modes/check_mk.py
+++ b/cmk_base/modes/check_mk.py
@@ -1340,14 +1340,18 @@ modes.register(Mode(
# '----------------------------------------------------------------------'
def mode_notify(options, *args):
+ import cmk_base.config as config
import cmk_base.notify as notify
+ config.load(with_conf_d=True, validate_hosts=False)
return notify.do_notify(options, *args)
modes.register(Mode(
long_option="notify",
handler_function=mode_notify,
needs_config=False,
- needs_checks=False,
+ # TODO: Sadly needs to be True because the checks need to initialize the check
specific
+ # configuration variables before the config can be loaded.
+ needs_checks=True,
argument=True,
argument_descr="MODE",
argument_optional=True,
diff --git a/cmk_base/notify.py b/cmk_base/notify.py
index 6973c25..cf1e6f4 100644
--- a/cmk_base/notify.py
+++ b/cmk_base/notify.py
@@ -169,9 +169,6 @@ def do_notify(options, args):
if keepalive and "keepalive" in options:
keepalive.enable()
- config.load_packed_config()
- else:
- config.load(with_conf_d=True, validate_hosts=False)
convert_legacy_configuration()