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:56 UTC
[7/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/27a57a9e
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/27a57a9e
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/27a57a9e
Branch: refs/heads/1.3.x
Commit: 27a57a9e3a5a10d1fe03207ada3a409a570a0b48
Parents: a77d242
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 17:54:16 2017 -0700
----------------------------------------------------------------------
src/slave/slave.cpp | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/27a57a9e/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 5ebbb87..ce57620 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -3978,11 +3978,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];