You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by id...@apache.org on 2014/06/25 23:59:52 UTC
git commit: Handle container destroy during launch for
MesosContainerizer.
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 <id...@twitter.com>
Authored: Wed Jun 25 14:31:46 2014 -0700
Committer: Ian Downes <id...@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.