Module: check_mk
Branch: master
Commit: 00d27085deca4ed09a1974be9d04124eb800162e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=00d27085deca4e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Sep 5 11:33:14 2018 +0200
6550 FIX Fixed warning "bad ps syntax" when stopping a site on e.g. SLES11
When using older ps versions like procps 3.2.7, which is used e.g. on SLES11, a warning
message
like this was displayed when executing "omd stop" on a site:
Warning: bad ps syntax, perhaps a bogus '-'? See
http://procps.sf.net/faq.html
Stopping 1 remaining site processes...OK
Change-Id: I7643eeb156c4e6a0a0e1150f94f7dde0559cb296
---
.werks/6550 | 15 +++++++++++++++
omd/packages/omd/omd | 2 +-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/.werks/6550 b/.werks/6550
new file mode 100644
index 0000000..3b4bee7
--- /dev/null
+++ b/.werks/6550
@@ -0,0 +1,15 @@
+Title: Fixed warning "bad ps syntax" when stopping a site on e.g. SLES11
+Level: 1
+Component: omd
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1536139894
+
+When using older ps versions like procps 3.2.7, which is used e.g. on SLES11, a warning
message
+like this was displayed when executing "omd stop" on a site:
+
+Warning: bad ps syntax, perhaps a bogus '-'? See
http://procps.sf.net/faq.html
+Stopping 1 remaining site processes...OK
diff --git a/omd/packages/omd/omd b/omd/packages/omd/omd
index ea8da3e..c5a2d35 100644
--- a/omd/packages/omd/omd
+++ b/omd/packages/omd/omd
@@ -3957,7 +3957,7 @@ def site_user_processes(exclude_current_and_parents):
if exclude_current_and_parents:
exclude = get_current_and_parent_pids()
- p = subprocess.Popen(["ps", "-U", g_sitename, "-o",
"pid", "-h"], close_fds=True,
+ p = subprocess.Popen(["ps", "-U", g_sitename, "-o",
"pid", "--no-headers"], close_fds=True,
stdin=open(os.devnull), stdout=subprocess.PIPE)
exclude.append(p.pid)