You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by qi...@apache.org on 2018/10/19 03:01:08 UTC

[mesos] branch 1.5.x updated (bffa64a -> 2ead30d)

This is an automated email from the ASF dual-hosted git repository.

qianzhang pushed a change to branch 1.5.x
in repository https://gitbox.apache.org/repos/asf/mesos.git.


    from bffa64a  Fixed the FreeBSD MACRO as '__FreeBSD__' in posix/pipe.hpp.
     new 08541d6  Updated mininal supported Docker version from 1.0.0 to 1.8.0.
     new 9aa3ae1  Specified `--type=container` for `docker inspect` command.
     new 2ead30d  Added MESOS-9231 to the 1.5.2 CHANGELOG.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG                          |  1 +
 docs/docker-containerizer.md       |  2 +-
 src/docker/docker.cpp              |  3 ++-
 src/docker/executor.cpp            | 10 ----------
 src/slave/containerizer/docker.cpp |  9 ---------
 src/tests/health_check_tests.cpp   | 18 ------------------
 6 files changed, 4 insertions(+), 39 deletions(-)


[mesos] 02/03: Specified `--type=container` for `docker inspect` command.

Posted by qi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

qianzhang pushed a commit to branch 1.5.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 9aa3ae130f00485b27f6d91bdf1611718983f431
Author: Qian Zhang <zh...@gmail.com>
AuthorDate: Wed Sep 26 08:32:51 2018 +0800

    Specified `--type=container` for `docker inspect` command.
    
    Without `--type` option, `docker inspect` is generic and will match
    against any object types. However in our case, we only care about
    Docker container rather than any other object types, so we need to
    add `--type=container` so that `docker inspect` will only match Docker
    container.
    
    Review: https://reviews.apache.org/r/68872
---
 src/docker/docker.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/docker/docker.cpp b/src/docker/docker.cpp
index 172abab..ef4ef26 100644
--- a/src/docker/docker.cpp
+++ b/src/docker/docker.cpp
@@ -1288,6 +1288,7 @@ Future<Docker::Container> Docker::inspect(
   argv.push_back("-H");
   argv.push_back(socket);
   argv.push_back("inspect");
+  argv.push_back("--type=container");
   argv.push_back(containerName);
 
   _inspect(argv, promise, retryInterval, callback);


[mesos] 01/03: Updated mininal supported Docker version from 1.0.0 to 1.8.0.

Posted by qi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

qianzhang pushed a commit to branch 1.5.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 08541d6c52f254e23032b924648e48d711bbc032
Author: Qian Zhang <zh...@gmail.com>
AuthorDate: Sat Sep 29 11:07:46 2018 +0800

    Updated mininal supported Docker version from 1.0.0 to 1.8.0.
    
    The reason that we need Docker 1.8.0+ is, for `docker inspect` command,
    we need to specify the option `--type=container` which was added to the
    `docker inspect` command starting from Docker 1.8.0.
    
    Review: https://reviews.apache.org/r/68882
---
 docs/docker-containerizer.md       |  2 +-
 src/docker/docker.cpp              |  2 +-
 src/docker/executor.cpp            | 10 ----------
 src/slave/containerizer/docker.cpp |  9 ---------
 src/tests/health_check_tests.cpp   | 18 ------------------
 5 files changed, 2 insertions(+), 39 deletions(-)

diff --git a/docs/docker-containerizer.md b/docs/docker-containerizer.md
index 941a153..213e5d4 100644
--- a/docs/docker-containerizer.md
+++ b/docs/docker-containerizer.md
@@ -22,7 +22,7 @@ the agent with "docker" as one of the containerizers option.
 Example: `mesos-agent --containerizers=docker,mesos`
 
 Each agent that has the Docker containerizer should have Docker CLI
-client installed (version >= 1.0.0).
+client installed (version >= 1.8.0).
 
 If you enable iptables on agent, make sure the iptables allow all
 traffic from docker bridge interface through add below rule:
diff --git a/src/docker/docker.cpp b/src/docker/docker.cpp
index 505f1ef..172abab 100644
--- a/src/docker/docker.cpp
+++ b/src/docker/docker.cpp
@@ -142,7 +142,7 @@ Try<Owned<Docker>> Docker::create(
   }
 #endif // __linux__
 
-  Try<Nothing> validateVersion = docker->validateVersion(Version(1, 0, 0));
+  Try<Nothing> validateVersion = docker->validateVersion(Version(1, 8, 0));
   if (validateVersion.isError()) {
     return Error(validateVersion.error());
   }
diff --git a/src/docker/executor.cpp b/src/docker/executor.cpp
index df27083..7b48f84 100644
--- a/src/docker/executor.cpp
+++ b/src/docker/executor.cpp
@@ -728,16 +728,6 @@ private:
     // To make sure the health check runs in the same mount namespace
     // with the container, we wrap the original command in `docker exec`.
     if (healthCheck.has_command()) {
-      // `docker exec` requires docker version greater than 1.3.0.
-      Try<Nothing> validateVersion =
-        docker->validateVersion(Version(1, 3, 0));
-
-      if (validateVersion.isError()) {
-        LOG(ERROR) << "Unable to launch health check process: "
-                   << validateVersion.error();
-        return;
-      }
-
       // Wrap the original health check command in `docker exec`.
       const CommandInfo& command = healthCheck.command();
 
diff --git a/src/slave/containerizer/docker.cpp b/src/slave/containerizer/docker.cpp
index be54f57..9dbb286 100644
--- a/src/slave/containerizer/docker.cpp
+++ b/src/slave/containerizer/docker.cpp
@@ -185,15 +185,6 @@ Try<DockerContainerizer*> DockerContainerizer::create(
 
   Shared<Docker> docker = create->share();
 
-  if (flags.docker_mesos_image.isSome()) {
-    Try<Nothing> validateResult = docker->validateVersion(Version(1, 5, 0));
-    if (validateResult.isError()) {
-      string message = "Docker with mesos images requires docker 1.5+";
-      message += validateResult.error();
-      return Error(message);
-    }
-  }
-
   // TODO(tnachen): We should also mark the work directory as shared
   // mount here, more details please refer to MESOS-3483.
 
diff --git a/src/tests/health_check_tests.cpp b/src/tests/health_check_tests.cpp
index 1893c85..061afa1 100644
--- a/src/tests/health_check_tests.cpp
+++ b/src/tests/health_check_tests.cpp
@@ -567,15 +567,6 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(HealthCheckTest, ROOT_DOCKER_DockerHealthyTask)
   Shared<Docker> docker(new MockDocker(
       tests::flags.docker, tests::flags.docker_socket));
 
-  Try<Nothing> validateResult = docker->validateVersion(Version(1, 3, 0));
-  ASSERT_SOME(validateResult)
-    << "-------------------------------------------------------------\n"
-    << "We cannot run this test because of 'docker exec' command \n"
-    << "require docker version greater than '1.3.0'. You won't be \n"
-    << "able to use the docker exec method, but feel free to disable\n"
-    << "this test.\n"
-    << "-------------------------------------------------------------";
-
   Try<Owned<cluster::Master>> master = StartMaster();
   ASSERT_SOME(master);
 
@@ -855,15 +846,6 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(
   Shared<Docker> docker(new MockDocker(
       tests::flags.docker, tests::flags.docker_socket));
 
-  Try<Nothing> validateResult = docker->validateVersion(Version(1, 3, 0));
-  ASSERT_SOME(validateResult)
-    << "-------------------------------------------------------------\n"
-    << "We cannot run this test because of 'docker exec' command \n"
-    << "require docker version greater than '1.3.0'. You won't be \n"
-    << "able to use the docker exec method, but feel free to disable\n"
-    << "this test.\n"
-    << "-------------------------------------------------------------";
-
   Try<Owned<cluster::Master>> master = StartMaster();
   ASSERT_SOME(master);
 


[mesos] 03/03: Added MESOS-9231 to the 1.5.2 CHANGELOG.

Posted by qi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

qianzhang pushed a commit to branch 1.5.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 2ead30d0009109e582a5d5943d483e6faaae4d03
Author: Qian Zhang <zh...@gmail.com>
AuthorDate: Fri Oct 19 09:32:00 2018 +0800

    Added MESOS-9231 to the 1.5.2 CHANGELOG.
---
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG b/CHANGELOG
index 511bae1..76cb080 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -39,6 +39,7 @@ Release Notes - Mesos - Version 1.5.2 (WIP)
   * [MESOS-9151] - Container stuck at ISOLATING due to FD leak.
   * [MESOS-9170] - Zookeeper doesn't compile with newer gcc due to format error.
   * [MESOS-9196] - Removing rootfs mounts may fail with EBUSY.
+  * [MESOS-9231] - `docker inspect` may return an unexpected result to Docker executor due to a race condition.
   * [MESOS-9267] - Mesos agent crashes when CNI network is not configured but used.
   * [MESOS-9279] - Docker Containerizer 'usage' call might be expensive if mount table is big.
   * [MESOS-9283] - Docker containerizer actor can get backlogged with large number of containers.