Repository: mesos
Updated Branches:
  refs/heads/master ac9e1b005 -> 15613c806


Fixed a double close bug in the docker containerizer.

The slave will destroy executors that are not launched
successfully, which will close all open file descriptors,
thus the extra close is not needed.

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


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

Branch: refs/heads/master
Commit: 15613c806446e8c9168f705808104548b8a0ce68
Parents: ac9e1b0
Author: Chi Zhang <[email protected]>
Authored: Tue Sep 29 12:23:51 2015 -0700
Committer: Benjamin Mahler <[email protected]>
Committed: Tue Sep 29 12:23:51 2015 -0700

----------------------------------------------------------------------
 src/slave/containerizer/docker.cpp | 5 -----
 1 file changed, 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/15613c80/src/slave/containerizer/docker.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/docker.cpp 
b/src/slave/containerizer/docker.cpp
index efa3726..6c975f9 100644
--- a/src/slave/containerizer/docker.cpp
+++ b/src/slave/containerizer/docker.cpp
@@ -923,10 +923,6 @@ Future<pid_t> 
DockerContainerizerProcess::launchExecutorProcess(
   Try<Nothing> checkpointed = checkpoint(containerId, s.get().pid());
 
   if (checkpointed.isError()) {
-    // Close the subprocess's stdin so that it aborts.
-    CHECK_SOME(s.get().in());
-    os::close(s.get().in().get());
-
     return Failure(
         "Failed to checkpoint executor's pid: " + checkpointed.error());
   }
@@ -941,7 +937,6 @@ Future<pid_t> 
DockerContainerizerProcess::launchExecutorProcess(
 
   if (length != sizeof(c)) {
     string error = string(strerror(errno));
-    os::close(s.get().in().get());
     return Failure("Failed to synchronize with child process: " + error);
   }
 

Reply via email to