You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by tn...@apache.org on 2016/02/19 00:47:38 UTC

mesos git commit: Fixed compilation issue with clang.

Repository: mesos
Updated Branches:
  refs/heads/master ac10a67f7 -> 83bf5671e


Fixed compilation issue with clang.


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

Branch: refs/heads/master
Commit: 83bf5671ee33cc03291714e5fd801e49552088fc
Parents: ac10a67
Author: Timothy Chen <tn...@gmail.com>
Authored: Thu Feb 18 23:36:43 2016 +0000
Committer: Timothy Chen <tn...@apache.org>
Committed: Thu Feb 18 15:44:58 2016 -0800

----------------------------------------------------------------------
 src/slave/containerizer/docker.cpp | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/83bf5671/src/slave/containerizer/docker.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/docker.cpp b/src/slave/containerizer/docker.cpp
index 50248e5..0303208 100644
--- a/src/slave/containerizer/docker.cpp
+++ b/src/slave/containerizer/docker.cpp
@@ -922,7 +922,8 @@ Try<Nothing> unmountPersistentVolumes(const ContainerID& containerId)
 Future<Nothing> DockerContainerizerProcess::__recover(
     const list<Docker::Container>& _containers)
 {
-  list<Future<ContainerID>> futures;
+  list<ContainerID> containerIds;
+  list<Future<Nothing>> futures;
   foreach (const Docker::Container& container, _containers) {
     VLOG(1) << "Checking if Docker container named '"
             << container.name << "' was started by Mesos";
@@ -945,20 +946,14 @@ Future<Nothing> DockerContainerizerProcess::__recover(
           docker->stop(
               container.id,
               flags.docker_stop_timeout,
-              true)
-            .then([id]() { return id.get(); }));
+              true));
+      containerIds.push_back(id.get());
     }
   }
 
   return collect(futures)
-    .then([](Future<list<ContainerID>> future) -> Future<Nothing> {
-      if (!future.isReady()) {
-        return Failure("Unable to stop orphaned Docker containers: " +
-                       (future.isFailed() ?
-                        future.failure() : "future discarded"));
-      }
-
-      foreach (const ContainerID& containerId, future.get()) {
+    .then([containerIds]() -> Future<Nothing> {
+      foreach (const ContainerID& containerId, containerIds) {
         Try<Nothing> unmount = unmountPersistentVolumes(containerId);
         if (unmount.isError()) {
           return Failure("Unable to unmount volumes for Docker container '" +