You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2017/05/27 01:19:57 UTC

[8/9] mesos git commit: Don't crash the agent when an unknown executor re-registers.

Don't crash the agent when an unknown executor re-registers.

Rather than crashing the agent, the agent will tell the executor
to shut down.

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


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

Branch: refs/heads/1.3.x
Commit: 107598451bec812a8d845507a938d305b9c7adac
Parents: 27a57a9
Author: Benjamin Mahler <bm...@apache.org>
Authored: Thu May 25 16:44:24 2017 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Fri May 26 17:54:22 2017 -0700

----------------------------------------------------------------------
 src/slave/slave.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/10759845/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index ce57620..4b7a336 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -4003,7 +4003,14 @@ void Slave::reregisterExecutor(
   }
 
   Executor* executor = framework->getExecutor(executorId);
-  CHECK_NOTNULL(executor);
+
+  if (executor == nullptr) {
+    LOG(WARNING) << "Shutting down unknown executor '" << executorId << "'"
+                 << " of framework " << frameworkId;
+
+    reply(ShutdownExecutorMessage());
+    return;
+  }
 
   switch (executor->state) {
     case Executor::TERMINATING: