Module: check_mk
Branch: master
Commit: de0dac17b7062f226a9554120490bdbd658a0287
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=de0dac17b7062f…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Tue Jul 3 15:57:29 2018 +0200
6302 FIX check_mk_agent.linux: Fixed 'oci runtime error: exec failed:
container_linux.go:265: starting container process caused "exec:
\"check_mk_agent\": executable file not found in $PATH"'
Change-Id: I66f2b68cfb6efc1c84808b6e1c158858be43950a
---
.werks/6302 | 10 ++++++++++
agents/check_mk_agent.linux | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.werks/6302 b/.werks/6302
new file mode 100644
index 0000000..9adc520
--- /dev/null
+++ b/.werks/6302
@@ -0,0 +1,10 @@
+Title: check_mk_agent.linux: Fixed 'oci runtime error: exec failed:
container_linux.go:265: starting container process caused "exec:
\"check_mk_agent\": executable file not found in $PATH"'
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1530626219
+Class: fix
+
+
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index ac842d9..4b14d9a 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -1038,7 +1038,7 @@ if type docker > /dev/null 2>&1 && [ -z
"$MK_IS_PIGGYBACKED" ]; then
# the container.
# Once it comes to plugins and custom configuration the user needs to use
# a little more complex setup. Have a look at the documentation.
- AGENT_PATH=$(docker container exec "$CONTAINER_ID" which check_mk_agent
2>/dev/null)
+ AGENT_PATH=$(docker container exec "$CONTAINER_ID" bash -c "type
check_mk_agent" 2>/dev/null)
if [ -n "$AGENT_PATH" ]; then
docker container exec --env MK_IS_PIGGYBACKED=1 --env
"REMOTE=$REMOTE" "$CONTAINER_ID" check_mk_agent
elif docker container exec "$CONTAINER_ID" which bash >/dev/null
2>&1; then