Module: check_mk
Branch: master
Commit: 85fb3af03546de958fe5f8d764b27468f1b8c3f7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=85fb3af03546de…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon May 14 09:21:34 2018 +0200
6064 FIX Fixed possible hanging updates from 1.5 versions
When the "omd update" is executed as root user for a site, the update
might hang in case the default OMD version on the system is a 1.5 version.
To workaround this issue you may execute the "omd update" command as site user.
Change-Id: I8677df8ff5f8799db735853749f15f4d32f3ac26
---
.werks/6064 | 14 ++++++++++++++
omd/packages/omd/omd | 3 ++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/.werks/6064 b/.werks/6064
new file mode 100644
index 0000000..914f8c3
--- /dev/null
+++ b/.werks/6064
@@ -0,0 +1,14 @@
+Title: Fixed possible hanging updates from 1.5 versions
+Level: 1
+Component: omd
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1526282366
+
+When the "omd update" is executed as root user for a site, the update
+might hang in case the default OMD version on the system is a 1.5 version.
+
+To workaround this issue you may execute the "omd update" command as site
user.
diff --git a/omd/packages/omd/omd b/omd/packages/omd/omd
index fec9cb0..e16bc09 100644
--- a/omd/packages/omd/omd
+++ b/omd/packages/omd/omd
@@ -31,7 +31,8 @@
# python libraries. Newer versions unset these variables before, so this
# additional execv() is only needed when updating from older versions.
import os, sys
-if len(sys.argv) > 1 and sys.argv[1] == "update" and sys.version_info[2] !=
14:
+if len(sys.argv) > 1 and sys.argv[1] == "update" \
+ and (sys.version_info[0] == 2 and sys.version_info[1] == 7 and sys.version_info[2]
< 14):
# Prevent inheriting environment variables from this versions/site environment
# into the execed omd call. The OMD call must import the python version related
# modules and libaries. This only works when PYTHONPATH and LD_LIBRARY_PATH are