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/12/10 21:32:13 UTC
[2/2] mesos git commit: Added comments around some health check
limitations.
Added comments around some health check limitations.
Review: https://reviews.apache.org/r/54570
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/f70838ad
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/f70838ad
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/f70838ad
Branch: refs/heads/master
Commit: f70838adb8fad717c616846a0527ece1325548f6
Parents: a6bb33b
Author: Alexander Rukletsov <al...@apache.org>
Authored: Fri Dec 9 04:20:16 2016 +0100
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Sat Dec 10 22:32:31 2016 +0100
----------------------------------------------------------------------
docs/health-checks.md | 11 ++++++++++-
src/health-check/health_checker.cpp | 4 ++++
2 files changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/f70838ad/docs/health-checks.md
----------------------------------------------------------------------
diff --git a/docs/health-checks.md b/docs/health-checks.md
index 9e3be78..890e298 100644
--- a/docs/health-checks.md
+++ b/docs/health-checks.md
@@ -209,6 +209,10 @@ check must be interpreted by an executor:
`delay_seconds`, i.e., setting `grace_period_seconds` < `delay_seconds` has
no effect.
+**NOTE:** Since each time a health check is performed a helper command is
+launched (see [limitations](#current-limitations)), setting `timeout_seconds`
+to a small value, e.g., `<5s`, may lead to intermittent failures.
+
As an example, the code below specifies a task which is a Docker container with
a simple HTTP server listening on port `8080` and an HTTP health check that
should be performed every second starting from the task launch and allows
@@ -274,7 +278,9 @@ and its tasks are in the same network namespace.
respective framework's documentation.
Regardless of executor, all resources used to health check a task are accounted
-towards task's resource allocation.
+towards task's resource allocation. Hence it is a good idea to add some extra
+resources, e.g., 0.05 cpu and 32MB mem, to the task definition if a Mesos-native
+health check is specified.
<a name="current-limitations"></a>
@@ -297,6 +303,9 @@ towards task's resource allocation.
[MESOS-6117](https://issues.apache.org/jira/browse/MESOS-6117)).
* Only a single health check per task is allowed (see
[MESOS-5962](https://issues.apache.org/jira/browse/MESOS-5962)).
+* Each time a health check runs, [a helper command is launched](#under-the-hood).
+ This introduces some run-time overhead (see
+ [MESOS-6766](https://issues.apache.org/jira/browse/MESOS-6766)).
* A task without a health check may be indistinguishable from a task with a
health check but still in a grace period. An extra state should be introduced
(see [MESOS-6417](https://issues.apache.org/jira/browse/MESOS-6417)).
http://git-wip-us.apache.org/repos/asf/mesos/blob/f70838ad/src/health-check/health_checker.cpp
----------------------------------------------------------------------
diff --git a/src/health-check/health_checker.cpp b/src/health-check/health_checker.cpp
index c0d150a..7442e7d 100644
--- a/src/health-check/health_checker.cpp
+++ b/src/health-check/health_checker.cpp
@@ -429,6 +429,8 @@ Future<Nothing> HealthCheckerProcess::httpHealthCheck()
url
};
+ // TODO(alexr): Consider launching the helper binary once per task lifetime,
+ // see MESOS-6766.
Try<Subprocess> s = subprocess(
HTTP_CHECK_COMMAND,
argv,
@@ -553,6 +555,8 @@ Future<Nothing> HealthCheckerProcess::tcpHealthCheck()
"--port=" + stringify(tcp.port())
};
+ // TODO(alexr): Consider launching the helper binary once per task lifetime,
+ // see MESOS-6766.
Try<Subprocess> s = subprocess(
tcpConnectPath,
tcpConnectArguments,