Module: check_mk
Branch: master
Commit: a81eb5711d55882e5ebb57068a0dc0b9bc3ef245
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a81eb5711d5588…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Sep 18 14:16:44 2017 +0200
5229 FIX Rename host: fixed exception when having more than 1024 users configured
For each configured user, WATO kept a file open during the rename procedure.
Having more than 1024 users breached the <tt>ulimit -n</tt> option and a
<tt>Too many open files</tt> exception occurred.
---
.werks/5229 | 12 ++++++++++++
web/htdocs/wato.py | 1 +
2 files changed, 13 insertions(+)
diff --git a/.werks/5229 b/.werks/5229
new file mode 100644
index 0000000..637da3d
--- /dev/null
+++ b/.werks/5229
@@ -0,0 +1,12 @@
+Title: Rename host: fixed exception when having more than 1024 users configured
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1505736767
+
+For each configured user, WATO kept a file open during the rename procedure.
+Having more than 1024 users breached the <tt>ulimit -n</tt> option and a
<tt>Too many open files</tt> exception occurred.
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index a05d0b8..4887948 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -1971,6 +1971,7 @@ def rename_host_in_multisite(oldname, newname):
store.save_data_to_file(favpath, favorites)
users_changed += 1
total_changed += num_changed
+ store.release_lock(favpath)
if users_changed:
return [ "favorites" ] * total_changed