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 02:56:23 UTC

[mesos] branch 1.6.x updated (68c80c7 -> 689cb5c)

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

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


    from 68c80c7  Fixed the FreeBSD MACRO as '__FreeBSD__' in posix/pipe.hpp.
     new 92d3e35  Updated mininal supported Docker version from 1.0.0 to 1.8.0.
     new 24283d3  Specified `--type=container` for `docker inspect` command.
     new 689cb5c  Added MESOS-9231 to the 1.6.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            | 14 --------------
 src/slave/containerizer/docker.cpp |  9 ---------
 src/tests/health_check_tests.cpp   | 27 ---------------------------
 6 files changed, 4 insertions(+), 52 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.6.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 24283d32b36868a087df8b08e356d27bb05fc37c
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 47ddf04..d1b949f 100644
--- a/src/docker/docker.cpp
+++ b/src/docker/docker.cpp
@@ -1320,6 +1320,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] 03/03: Added MESOS-9231 to the 1.6.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.6.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 689cb5c0a6f0403e0deabe236551ccf19fc655e5
Author: Qian Zhang <zh...@gmail.com>
AuthorDate: Fri Oct 19 08:59:23 2018 +0800

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

diff --git a/CHANGELOG b/CHANGELOG
index 66b2120..d26dbae 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -21,6 +21,7 @@ Release Notes - Mesos - Version 1.6.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-9274] - v1 JAVA scheduler library can drop TEARDOWN upon destruction.
   * [MESOS-9279] - Docker Containerizer 'usage' call might be expensive if mount table is big.


[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.6.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 92d3e35f52a09b71db44e29dc1722c8f67986f31
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            | 14 --------------
 src/slave/containerizer/docker.cpp |  9 ---------
 src/tests/health_check_tests.cpp   | 27 ---------------------------
 5 files changed, 2 insertions(+), 52 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 7be1278..47ddf04 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 572594a..57cfbcd 100644
--- a/src/docker/executor.cpp
+++ b/src/docker/executor.cpp
@@ -784,20 +784,6 @@ private:
 
     HealthCheck healthCheck = task.health_check();
 
-    // 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;
-      }
-    }
-
     vector<string> namespaces;
     if (healthCheck.type() == HealthCheck::HTTP ||
         healthCheck.type() == HealthCheck::TCP) {
diff --git a/src/slave/containerizer/docker.cpp b/src/slave/containerizer/docker.cpp
index 94c30d9..ef468ed 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 c4661b4..9fa04af 100644
--- a/src/tests/health_check_tests.cpp
+++ b/src/tests/health_check_tests.cpp
@@ -2348,15 +2348,6 @@ TEST_F(DockerContainerizerHealthCheckTest, 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);
 
@@ -2478,15 +2469,6 @@ TEST_F(DockerContainerizerHealthCheckTest, ROOT_DOCKER_DockerHealthStatusChange)
   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);
 
@@ -2661,15 +2643,6 @@ TEST_F(
   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);