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/26 23:29:57 UTC
[4/6] 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/3f029d04
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/3f029d04
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/3f029d04
Branch: refs/heads/master
Commit: 3f029d04d163c1a793e1cb8337b051f031b7a89f
Parents: 0d0af7a
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 16:29:44 2017 -0700
----------------------------------------------------------------------
src/slave/slave.cpp | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/3f029d04/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 3865d2a..2835fc2 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -4022,7 +4022,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: