Module: check_mk
Branch: master
Commit: 6a209f7ae7418f6563e02f24694067355c502d7d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6a209f7ae7418f…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Jun 12 11:16:16 2017 +0200
logwatch.py minor code cleanup in may_see function
Change-Id: I058ba0bab13a8a6f78c3a176832486329369c915
---
web/htdocs/logwatch.py | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/web/htdocs/logwatch.py b/web/htdocs/logwatch.py
index 3b301d3..e2feb0b 100644
--- a/web/htdocs/logwatch.py
+++ b/web/htdocs/logwatch.py
@@ -566,12 +566,17 @@ def may_see(site, host_name):
if config.user.may("general.see_all"):
return True
- if site:
- sites.live().set_only_sites([site])
+ host_found = False
+ try:
+ if site:
+ sites.live().set_only_sites([site])
+ # Note: This query won't work in a distributed setup and no site given as argument
+ # livestatus connection is setup with AuthUser
+ host_found = sites.live().query_value("GET hosts\nStats: state >= 0\nFilter: name = %s\n" % lqencode(host_name)) > 0
+ finally:
+ sites.live().set_only_sites(None)
- # Note: This query won't work in a distributed setup and no site given as argument
- # livestatus connection is setup with AuthUser
- return sites.live().query_value("GET hosts\nStats: state >= 0\nFilter: name = %s\n" % lqencode(host_name)) > 0
+ return host_found
# Tackle problem, where some characters are missing in the service
Module: check_mk
Branch: master
Commit: a2777d4bb3f74885a24faa54457c6805d5ada145
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a2777d4bb3f748…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed May 31 17:26:28 2017 +0200
Updated bug entries #2901
Change-Id: I3dafcc8bffeec997f33e1d0ff0ec902fbc95cf9b
---
.bugs/2901 | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/.bugs/2901 b/.bugs/2901
index e214937..ba4683a 100644
--- a/.bugs/2901
+++ b/.bugs/2901
@@ -1,9 +1,9 @@
Title: ActivateChangesManager: is_running fails if last known process id is used by another process
Component: wato
-State: open
+Class: bug
+State: done
Date: 2017-05-31 11:26:15
Targetversion: 1.4.0
-Class: bug
The activation folder seems to include some status files for each site.
@@ -47,3 +47,6 @@ This may happen on "Activate changes", which shows an "[Errno 1] Operation not p
OSError: [Errno 1] Operation not permitted
+
+2017-05-31 17:26:25: changed state open -> done
+fixed with werk 4754
Module: check_mk
Branch: master
Commit: 704a3434fe965b1a303665e7366530e6bf1e0984
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=704a3434fe965b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Jun 12 09:48:41 2017 +0200
Updated bug entries #2556
Change-Id: I265fc40af1ecc7a4b27ad7d2eff54aaef0750b24
---
.bugs/2556 | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/.bugs/2556 b/.bugs/2556
new file mode 100644
index 0000000..8a1f9ab
--- /dev/null
+++ b/.bugs/2556
@@ -0,0 +1,23 @@
+Title: Rework setting of environment variables in whole OMD context
+Component: core
+State: open
+Date: 2017-06-12 09:45:35
+Targetversion: 1.4.0
+Class: bug
+
+Environment variables should only be set in ~/.profile and
+will then be inherited by all sub- and subsubprocesses. It
+seem that some start scripts explicitely source that file.
+It also seems that in some situations not all variables
+are correctly inherited.
+
+We need to investigate this, clean this up, remove explizit
+sourcing of .profile and streamline this.
+
+All variables should be set just in two places:
+
+1. su - mysite
+2. omd ... mysite
+
+All other scripts such auch etc/init.d/* should simply
+rely on correct inheritance.
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