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/10 20:06:32 UTC

git commit: Change MesosContainerizer::update to not return failure for unknown container.

Repository: mesos
Updated Branches:
  refs/heads/master a0698ec5f -> 53cbf342d


Change MesosContainerizer::update to not return failure for unknown container.

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


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

Branch: refs/heads/master
Commit: 53cbf342ddecb88377910c3b91c4be6ee053f258
Parents: a0698ec
Author: Ian Downes <id...@twitter.com>
Authored: Wed Jun 4 16:20:40 2014 -0700
Committer: Ian Downes <id...@twitter.com>
Committed: Tue Jun 10 10:58:15 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/53cbf342/src/slave/containerizer/mesos_containerizer.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos_containerizer.cpp b/src/slave/containerizer/mesos_containerizer.cpp
index 1438024..a38564f 100644
--- a/src/slave/containerizer/mesos_containerizer.cpp
+++ b/src/slave/containerizer/mesos_containerizer.cpp
@@ -896,7 +896,12 @@ Future<Nothing> MesosContainerizerProcess::update(
   // after recovery so we must check the promises hashmap (which is set during
   // recovery).
   if (!promises.contains(containerId)) {
-    return Failure("Unknown container: " + stringify(containerId));
+    // It is not considered a failure if the container is not known
+    // because the slave will attempt to update the container's
+    // resources on a task's terminal state change but the executor
+    // may have already exited and the container cleaned up.
+    LOG(WARNING) << "Ignoring update for unknown container: " << containerId;
+    return Nothing();
   }
 
   // Store the resources for usage().