Repository: mesos
Updated Branches:
  refs/heads/master 904092c39 -> 0a6b8ac24


Bailed out in docker executor if a check is specified.

Review: https://reviews.apache.org/r/57774/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/0a6b8ac2
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/0a6b8ac2
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/0a6b8ac2

Branch: refs/heads/master
Commit: 0a6b8ac24b20a2b9e60591e7c449d5e04678e473
Parents: b465444
Author: Alexander Rukletsov <[email protected]>
Authored: Thu Mar 23 17:11:53 2017 +0100
Committer: Alexander Rukletsov <[email protected]>
Committed: Fri Mar 24 00:17:27 2017 +0100

----------------------------------------------------------------------
 src/docker/executor.cpp   |  8 ++++++++
 src/tests/check_tests.cpp | 14 ++++++++++++++
 2 files changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/0a6b8ac2/src/docker/executor.cpp
----------------------------------------------------------------------
diff --git a/src/docker/executor.cpp b/src/docker/executor.cpp
index e7805d8..528bcdb 100644
--- a/src/docker/executor.cpp
+++ b/src/docker/executor.cpp
@@ -251,6 +251,8 @@ public:
       // the run future.
     }));
 
+    inspect.onReady(defer(self(), &Self::launchCheck, task));
+
     inspect.onReady(
         defer(self(), &Self::launchHealthCheck, containerName, task));
   }
@@ -500,6 +502,12 @@ private:
     driver.get()->stop();
   }
 
+  void launchCheck(const TaskInfo& task)
+  {
+    // TODO(alexr): Implement general checks support, see MESOS-7250.
+    CHECK(!task.has_check()) << "Docker executor does not support checks yet";
+  }
+
   void launchHealthCheck(const string& containerName, const TaskInfo& task)
   {
     // Bail out early if we have been already killed or if the task has no

http://git-wip-us.apache.org/repos/asf/mesos/blob/0a6b8ac2/src/tests/check_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/check_tests.cpp b/src/tests/check_tests.cpp
index 95f5612..16f1c07 100644
--- a/src/tests/check_tests.cpp
+++ b/src/tests/check_tests.cpp
@@ -112,6 +112,7 @@ namespace tests {
 // are elements of the cartesian product `executor-type` x `check-type`
 // and are split into groups by `executor-type`:
 //   * command executor tests,
+//   * docker executor tests,
 //   * default executor tests.
 
 class CheckTest : public MesosTest
@@ -843,6 +844,19 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(CommandExecutorCheckTest, 
HTTPCheckDelivered)
 }
 
 
+// TODO(alexr): Implement following tests for the docker executor once
+// the docker executor supports checks.
+//
+// 1. COMMAND check with env var works, is delivered, and is reconciled
+//    properly.
+// 2. COMMAND check's status change is delivered. TODO(alexr): When check
+//    mocking is available, ensure only status changes are delivered.
+// 3. COMMAND check times out.
+// 4. COMMAND check and health check do not shadow each other; upon
+//    reconciliation both statuses are available.
+// 5. HTTP check works and is delivered.
+
+
 // These are check tests with the default executor.
 class DefaultExecutorCheckTest : public CheckTest {};
 

Reply via email to