Module: check_mk
Branch: master
Commit: 03089b7be12d3a54163cbd059f1e3af25370356b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=03089b7be12d3a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Nov 28 15:55:42 2017 +0100
5547 FIX Errors in pre-activate-changes hooks prevent configuration activation now
(regression since 1.2.8)
Exceptions in pre-activate-changes hooks, that one can register to extend the WATO
functionality
before loading changes into the monitoring core were suppressed and only shown to the user
if
the debug mode of the GUI is enabled.
These issues are now shown to the user during activation of a site in form of a short
exception
message. The full trace is shown in the var/log/web.log of the site the error happens on.
Change-Id: Ib699ff57de056c043e6a145f42ca2290397dee0d
---
.werks/5547 | 16 ++++++++++++++++
web/htdocs/watolib.py | 8 +-------
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/.werks/5547 b/.werks/5547
new file mode 100644
index 0000000..8c9bf95
--- /dev/null
+++ b/.werks/5547
@@ -0,0 +1,16 @@
+Title: Errors in pre-activate-changes hooks prevent configuration activation now
(regression since 1.2.8)
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i2
+Date: 1511880767
+
+Exceptions in pre-activate-changes hooks, that one can register to extend the WATO
functionality
+before loading changes into the monitoring core were suppressed and only shown to the
user if
+the debug mode of the GUI is enabled.
+
+These issues are now shown to the user during activation of a site in form of a short
exception
+message. The full trace is shown in the var/log/web.log of the site the error happens
on.
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index 4f9dcb5..f51c95e 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -6922,13 +6922,7 @@ def check_mk_local_automation(command, args=None,
indata="", stdin_data=None, ti
cmd = [ 'check_mk', '--automation', command, '--' ] + args
if command in [ 'restart', 'reload' ]:
- try:
- call_hook_pre_activate_changes()
- except Exception, e:
- if config.debug:
- raise
- html.show_error(_("<h1>Cannot activate changes</h1>%s")
% e)
- return
+ call_hook_pre_activate_changes()
cmd = [ make_utf8(a) for a in cmd ]
try: