Module: check_mk
Branch: master
Commit: 2de87f26e9e0de857e28bebc9933d47759ba0296
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2de87f26e9e0de…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jul 1 12:25:06 2015 +0200
#2372 FIX Avoid freezing WATO during bulk discovery if hosts do not respond in a timely
manner
---
.werks/2372 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 7 +++++++
3 files changed, 18 insertions(+)
diff --git a/.werks/2372 b/.werks/2372
new file mode 100644
index 0000000..daeafd9
--- /dev/null
+++ b/.werks/2372
@@ -0,0 +1,10 @@
+Title: Avoid freezing WATO during bulk discovery if hosts do not respond in a timely
manner
+Level: 2
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1435746279
+
+
diff --git a/ChangeLog b/ChangeLog
index 928e332..ebce334 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -45,6 +45,7 @@
* 2386 SEC: Fixed possible XSS on WATO rule edit page...
* 2344 FIX: Improved validation of selected rules when editing BI aggregations...
* 2346 FIX: Notifications: Fixed garbled page when switching on/off
bulks/backlog/user rules
+ * 2372 FIX: Avoid freezing WATO during bulk discovery if hosts do not respond in a
timely manner
Notifications:
* 2313 FIX: notification bulking: fixed exception for plugins which are not
configured with checkboxes, e.g. sms
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 61dcdf3..4fcf640 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -365,6 +365,9 @@ def need_sidebar_reload():
def lock_exclusive():
aquire_lock(defaults.default_config_dir + "/multisite.mk")
+def unlock_exclusive():
+ release_lock(defaults.default_config_dir + "/multisite.mk")
+
def git_command(args):
encoded_args = " ".join([ a.encode("utf-8") for a in args ])
@@ -3756,7 +3759,11 @@ def mode_bulk_inventory(phase):
arguments = [ "@scan" ] + arguments
if not html.get_checkbox("ignore_errors"):
arguments = [ "@raiseerrors" ] + arguments
+
+ unlock_exclusive() # Avoid freezing WATO when hosts do not respond
timely
counts, failed_hosts = check_mk_automation(site_id,
"inventory", arguments)
+ lock_exclusive()
+ load_hosts(folder)
# sum up host individual counts to have a total count
sum_counts = [ 0, 0, 0, 0 ] # added, removed, kept, new