Module: check_mk
Branch: master
Commit: e2a69826f3f899ea85048ea7246a34294621bc7a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e2a69826f3f899…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed May 31 17:26:16 2017 +0200
4754 FIX Fixed possible "Operation not permitted issue" during activation
In case a pid of a former activation process is reused by a process of
another user a "OSError: [Errno 1] Operation not permitted" exception
could occur.
Change-Id: Id79bd5010e9cf985893c41f276baf69f7e1ffffa
---
.werks/4754 | 12 ++++++++++++
web/htdocs/watolib.py | 4 +++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/4754 b/.werks/4754
new file mode 100644
index 0000000..32c8d31
--- /dev/null
+++ b/.werks/4754
@@ -0,0 +1,12 @@
+Title: Fixed possible "Operation not permitted issue" during activation
+Level: 1
+Component: wato
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1496244281
+Class: fix
+
+In case a pid of a former activation process is reused by a process of
+another user a "OSError: [Errno 1] Operation not permitted" exception
+could occur.
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index a185b55..599e1e2 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -4558,7 +4558,9 @@ class ActivateChangesManager(ActivateChanges):
os.kill(site_state["_pid"], 0)
return True # -> running
except OSError, e:
- if e.errno == 3:
+ # 3: not running
+ # 1: operation not permitted (another process reused this)
+ if e.errno in [ 3, 1 ]:
pass # -> not running
else:
raise