You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2016/07/22 13:18:45 UTC
[1/2] mesos git commit: Cleaned the arguments passed to health
checker in docker executor.
Repository: mesos
Updated Branches:
refs/heads/1.0.x d15e684cb -> c09ee618c
Cleaned the arguments passed to health checker in docker executor.
Docker executor wraps the health check command into `docker exec`
and leverages mesos-health-check binary to actually perform the
check. However prior to this patch there were unnecessary arguments
passed to the binary, including `path` / `argv[0]` mismatch, log
message was misleading as well.
Review: https://reviews.apache.org/r/50078/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/58051d5e
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/58051d5e
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/58051d5e
Branch: refs/heads/1.0.x
Commit: 58051d5ea6a4b2a5755c32747d237291851596ec
Parents: d15e684
Author: Alexander Rukletsov <ru...@gmail.com>
Authored: Tue Jul 19 18:37:49 2016 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Fri Jul 22 15:14:53 2016 +0200
----------------------------------------------------------------------
src/docker/executor.cpp | 41 +++++++++++++++++++++--------------------
1 file changed, 21 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/58051d5e/src/docker/executor.cpp
----------------------------------------------------------------------
diff --git a/src/docker/executor.cpp b/src/docker/executor.cpp
index 6951104..9fcf83c 100644
--- a/src/docker/executor.cpp
+++ b/src/docker/executor.cpp
@@ -493,28 +493,29 @@ private:
return;
}
- vector<string> argv;
- argv.push_back(docker->getPath());
- argv.push_back("exec");
- argv.push_back(containerName);
+ vector<string> commandArguments;
+ commandArguments.push_back(docker->getPath());
+ commandArguments.push_back("exec");
+ commandArguments.push_back(containerName);
if (command.shell()) {
- argv.push_back("sh");
- argv.push_back("-c");
- argv.push_back("\"");
- argv.push_back(command.value());
- argv.push_back("\"");
+ commandArguments.push_back("sh");
+ commandArguments.push_back("-c");
+ commandArguments.push_back("\"");
+ commandArguments.push_back(command.value());
+ commandArguments.push_back("\"");
} else {
- argv.push_back(command.value());
+ commandArguments.push_back(command.value());
foreach (const string& argument, command.arguments()) {
- argv.push_back(argument);
+ commandArguments.push_back(argument);
}
}
healthCheck.mutable_command()->set_shell(true);
healthCheck.mutable_command()->clear_arguments();
- healthCheck.mutable_command()->set_value(strings::join(" ", argv));
+ healthCheck.mutable_command()->set_value(
+ strings::join(" ", commandArguments));
JSON::Object json = JSON::protobuf(healthCheck);
@@ -522,19 +523,19 @@ private:
// Launch the subprocess using 'exec' style so that quotes can
// be properly handled.
- argv.push_back(path);
- argv.push_back("--executor=" + stringify(self()));
- argv.push_back("--health_check_json=" + stringify(json));
- argv.push_back("--task_id=" + task.task_id().value());
+ vector<string> checkerArguments;
+ checkerArguments.push_back(path);
+ checkerArguments.push_back("--executor=" + stringify(self()));
+ checkerArguments.push_back("--health_check_json=" + stringify(json));
+ checkerArguments.push_back("--task_id=" + task.task_id().value());
- const string cmd = strings::join(" ", argv);
-
- cout << "Launching health check process: " << cmd << endl;
+ cout << "Launching health check process: "
+ << strings::join(" ", checkerArguments) << endl;
Try<Subprocess> healthProcess =
process::subprocess(
path,
- argv,
+ checkerArguments,
// Intentionally not sending STDIN to avoid health check
// commands that expect STDIN input to block.
Subprocess::PATH("/dev/null"),
[2/2] mesos git commit: Cherry-pick of MESOS-5848 to 1.0.x.
Posted by al...@apache.org.
Cherry-pick of MESOS-5848 to 1.0.x.
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/c09ee618
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/c09ee618
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/c09ee618
Branch: refs/heads/1.0.x
Commit: c09ee618c89203b3fc2261d42626614f189fc1e8
Parents: 58051d5
Author: Alexander Rukletsov <al...@apache.org>
Authored: Fri Jul 22 15:18:17 2016 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Fri Jul 22 15:18:17 2016 +0200
----------------------------------------------------------------------
CHANGELOG | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/c09ee618/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index ccccc71..fa6b0b4 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -419,6 +419,7 @@ All Issues:
* [MESOS-5799] - docker::inspect() may get wrong output when a docker container is not in "running" state
* [MESOS-5806] - CNI isolator should prepare network related /etc/* files for containers using host mode but specify container images
* [MESOS-5845] - The fetcher can access any local file as root
+ * [MESOS-5848] - Docker health checks are malformed.
* [MESOS-5863] - Enabling SSL causes fetcher fail to fetch from HTTPS sites.
** Documentation