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 02:24:13 UTC

[3/9] mesos git commit: Don't crash when re-registering executor from an unknown framework.

Don't crash when re-registering executor from an unknown framework.

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

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


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

Branch: refs/heads/1.1.x
Commit: 41d3666af4c7688d70d674871698e5f284259d40
Parents: dd3643d
Author: Benjamin Mahler <bm...@apache.org>
Authored: Thu May 25 15:23:30 2017 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Fri May 26 19:18:17 2017 -0700

----------------------------------------------------------------------
 src/slave/slave.cpp | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/41d3666a/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 90ec503..a15b0a3 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -3419,11 +3419,14 @@ void Slave::reregisterExecutor(
     return;
   }
 
-  LOG(INFO) << "Re-registering executor '" << executorId
-            << "' of framework " << frameworkId;
+  if (!frameworks.contains(frameworkId)) {
+    LOG(WARNING) << "Shutting down executor '" << executorId << "'"
+                 << " of framework " << frameworkId
+                 << " because the framework is unknown";
 
-  CHECK(frameworks.contains(frameworkId))
-    << "Unknown framework " << frameworkId;
+    reply(ShutdownExecutorMessage());
+    return;
+  }
 
   Framework* framework = frameworks[frameworkId];