[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mesos-commits
Subject:    git commit: Handle container destroy during launch for MesosContainerizer.
From:       idownes () apache ! org
Date:       2014-06-25 21:59:52
Message-ID: 14a3bd2c212341489b6f6ebab3c83126 () git ! apache ! org
[Download RAW message or body]

Repository: mesos
Updated Branches:
  refs/heads/master d0046dca7 -> 74e09a82e


Handle container destroy during launch for MesosContainerizer.

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


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

Branch: refs/heads/master
Commit: 74e09a82ed0f6a63b82864b0f7d8c8f5d4eace7f
Parents: d0046dc
Author: Ian Downes <idownes@twitter.com>
Authored: Wed Jun 25 14:31:46 2014 -0700
Committer: Ian Downes <idownes@twitter.com>
Committed: Wed Jun 25 14:59:01 2014 -0700

----------------------------------------------------------------------
 src/slave/containerizer/mesos/containerizer.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/74e09a82/src/slave/containerizer/mesos/containerizer.cpp
                
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/containerizer.cpp \
b/src/slave/containerizer/mesos/containerizer.cpp index 27f8e09..2fd121f 100644
--- a/src/slave/containerizer/mesos/containerizer.cpp
+++ b/src/slave/containerizer/mesos/containerizer.cpp
@@ -753,7 +753,11 @@ Future<Nothing> MesosContainerizerProcess::exec(
     const ContainerID& containerId,
     int pipeWrite)
 {
-  CHECK(promises.contains(containerId));
+  // The container may be destroyed before we exec the executor so return
+  // failure here.
+  if (!promises.contains(containerId)) {
+    return Failure("Container destroyed during launch");
+  }
 
   // Now that we've contained the child we can signal it to continue by
   // writing to the pipe.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic